我在读这篇文章:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html#//apple_ref/doc/uid/TP40004447-1000810
里面有这么一段话:
但是我自己在IOS6中写个小程序,
NSMutableArray *array = [NSMutableArray array]
for (i = 0; i < 10; i++) {
NSNumber *allocedNumber = [[NSNumber alloc] initWithInteger:i];
[array addObject:allocedNumber];
}
根本不需要调用
autorelease
或者
release
,求详解。