【发布时间】:2011-01-05 17:42:50
【问题描述】:
如果我做以下事情,这会导致内存泄漏吗?
SomeClass* tmp;
NSDate* thetmpdate;
tmp = [[[SomeClass alloc] init] autorelease];
thetmpdate = [NSDate date];
// Do something long with tmp and date
tmp = [[[SomeClass alloc] init] autorelease];
thetmpdate = [NSDate date];
// Do something long with tmp and date
tmp = [[[SomeClass alloc] init] autorelease];
thetmpdate = [NSDate date];
// Do something long with tmp and date
【问题讨论】:
标签: objective-c memory-leaks autorelease assign