
How to set autorelease pool for NSThread method in Objective C?

[NSThread detachNewThreadSelector:@selector(yourMethod) toTarget:self withObject:nil];
- (void)yourMethod {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
//Do stuff
[pool release];
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.