I read this article:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html # / / apple_ref/doc/uid/TP40004447-1000810 There are so many words:
But I wrote a little program in IOS6 in,
NSMutableArray * array = [NSMutableArray array]
for (i = 0; i <10; i + +) {
NSNumber * allocedNumber = [[NSNumber alloc] initWithInteger: i];
[Array addObject: allocedNumber];
}
No need to call
autorelease
or
release
, seeking explain.
Reply: Your project is ARC, right? ARC, then do not call.
Reply: Is not in ios6, if you use ARC, the program will not need to consider ape memory management thing.
Reply: Yes, but not if you use ARC, problems of memory, the investigation would be more trouble ...
Reply: Okay, thank you, you have nothing to use the experience?
Reply: good, thank you, then you have nothing to use the experience?
ARC not used, used manual control. ARC works before watching colleague Richard memory problems, waste a lot of efforts.
No comments:
Post a Comment