AutoreleasePool, secondary thread and runloop: is it done automatically?
AutoreleasePool, secondary thread and runloop: is it done automatically?
- Subject: AutoreleasePool, secondary thread and runloop: is it done automatically?
- From: Stephane <email@hidden>
- Date: Wed, 31 Jan 2007 11:26:33 +0100
When you create a secondary thread, it is recommended (required) that
you add a autorelease pool object and release it.
But what shall be done if you run a NSRunLoop inside the secondary
thread.
Such as:
- void) myDetachedThreadedMethod:(id) pasgranchose
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[...] Add some imput methods [...]
[[NSRunLoop currentRunLoop] run];
[pool release];
}
Is there an autoreleasepool created/released "inside" the run loop as
this is the case for the main thread for a NSApplication?
The documentation is not very enlightening on this topic.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden