Search Results

Search found 1 results on 1 pages for 'user423977'.

Page 1/1 | 1 

  • 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 drain]; } And in main thread I release it: [anim release]; Now I want to ask if this is fine regarding memory management.

    Read the article

1