我在我的主线程中这样做:
CCAnimation *anim; //class variable
[NSThread detachNewThreadSelector:@selector(loadAimation) toTarget:self withObject:nil];
在加载动画中:
-(void) loadAnimation {
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
anim = [[CCAnimaton alloc] init];
[autoreleasepool drain];
}
在主线程中我释放它:
[anim release];
现在我想问一下关于内存管理是否可以。