上面写着应该返回的是这个对象的UINT_MAX, 并且不会释放, 这个UINT_MAX
最大二进制为(11111111111111111111111111111111)也是十六进制(0xffffffff)
如果你当成有符号数取补码后输出就得-1;
如果你当成无符号数就是最大数即:4294967295
2.在X64的机器上输出是9223372036854775807,int的最大值 在I386的机器上输出是2.因为NSNumber的numberWithInteger产生的对象是属于autorelease pool
在帮助文档中
可以看到这么一句话:
The retainCount method does not account for any pending autorelease messages send to the receiver.
就是说retainCount 对于autorelease消息产生的的对象,并不可靠。
3.Do not use this method. (required) You should never use-retainCount, because it never tells you anything useful. 永远不要用这个方法,只要遵守alloc,neworcopy以及任何需要分配内存的时候调用release就可以了
参考文档: