Trapped uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: URLString'
-[NSTaggedPointerString stringValue] unrecognized selector sent to xxxxx
一个普通的iOS程序,如果没有Tagged Pointer
对象,从32位机器迁移到64位机器中后,虽然逻辑没有任何变化,但这种NSNumber、NSDate一类的对象所占用的内存会翻倍。
为了改进上面提到的内存占用和效率问题,苹果提出了Tagged Pointer
对象。由于NSNumber、NSDate一类的变量本身的值需要占用的内存大小常常不需要8个字节,拿整数来说,4个字节所能表示的有符号整数就可以达到20多亿(注:2^31=2147483648,另外1位作为符号位),对于绝大多数情况都是可以处理的。
网友评论