Re: Still learning about NSAutoReleasePool
Re: Still learning about NSAutoReleasePool
- Subject: Re: Still learning about NSAutoReleasePool
- From: Jim Correia <email@hidden>
- Date: Sat, 11 Jun 2005 09:04:32 -0700
On Jun 11, 2005, at 8:58 AM, Eric Brunstad wrote: 3) your subsequent calls to -autorelease do nothing because the object is already in the autorelease pool.
Emphatically no.
autorelease doesn't mean do something if this object isn't already in a/the release pool. It simply means send this object a release message sometime later on.
If you send an object 3 autorelease messages, it will be sent 3 release messages later on.
If you alloc/copy and object, you must sent it 1 (and only 1) release or autorelease.
For each retain you send an object, you send it 1 (and only 1) release or autorelease.
There is no magic here.
Jim |
_______________________________________________
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