Re: Two threads two autorelease pools one object?
Re: Two threads two autorelease pools one object?
- Subject: Re: Two threads two autorelease pools one object?
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 2 Nov 2005 13:50:41 -0800
On Nov 2, 2005, at 12:57 PM, Brian O'Brien wrote:
is it possible that the instance of the object exists
in two auto-release pools at the same time
This is a red herring. Threaded or not, you just have to take care
to balance -retain and -release messages.
Objects don't "exist in auto-release pools", they exist in memory.
An Autorelease pool is nothing more than a delayed message
mechanism. Autorelease pools don't free objects, either. They send
objects a -release message, and the object itself decides whether
it's time to -dealloc.
If you have an object that's not going away when you expect it to,
then something else has retained it, and failed to release it.
-jcr
John C. Randolph <email@hidden> (408) 914-0013
Roaming Cocoa Engineer,
Available for your projects at great Expense and Inconvenience.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden