是否有必要在iPhone中发布NSInteger? [英] is it necessary to release a NSInteger in iphone?
问题描述
我得到这个错误有人知道吗???
2009-07-08 18:42:36.778 FlashCards [1297:20b]类别ID = 1
FlashCards(1297,0xa0690fa0)malloc: *对象0x4fd78a0的错误:被释放的指针不是已分配
FlashCards(1297,0xa0690fa0)malloc:* 对象0x4fdc200错误:double free
***在malloc_error_break中设置断点以进行调试
i am getting this error does some one knows about it??? 2009-07-08 18:42:36.778 FlashCards[1297:20b] Category Id=1 FlashCards(1297,0xa0690fa0) malloc: * error for object 0x4fd78a0: pointer being freed was not allocated FlashCards(1297,0xa0690fa0) malloc: * error for object 0x4fdc200: double free *** set a breakpoint in malloc_error_break to debug
推荐答案
不, NSInteger
不是对象;它只是 int
(对于32位应用程序)或 long
的typedef(对于64位应用程序) ):
No, an NSInteger
is not an object; it is simply a typedef for an int
(for 32-bit apps) or a long
(for 64-bit apps):
#if __LP64__
typedef long NSInteger;
#else
typedef int NSInteger;
endif
这篇关于是否有必要在iPhone中发布NSInteger?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!