Objective-C: Allocation in one thread and release in other
- by user423977
Hi
I am doing this in my Main Thread:
CCAnimation *anim; //class variable
[NSThread detachNewThreadSelector:@selector(loadAimation) toTarget:self withObject:nil];
In loadAimation:
-(void) loadAimation {
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
anim = [[CCAnimaton alloc] init];
[autoreleasepool…