Re: Memory management question
Re: Memory management question
- Subject: Re: Memory management question
- From: Alastair Houghton <email@hidden>
- Date: Wed, 24 Mar 2004 23:12:27 +0000
On 24 Mar 2004, at 22:36, Ondra Cada wrote:
>
Randall,
>
>
On Wednesday, Mar 24, 2004, at 23:02 Europe/Prague, Randall Meadows
>
wrote:
>
>
>> [[someObject retain] release];
>
>
>
> When an object gets deallocated, is it then set to nil?
>
>
Never. You do that yourself when appropriate.
>
>
> In the above sample, is then "someObject" == nil?
>
>
Besides, in the above sample, the object is not, repeat *NOT*
>
deallocated. Quite the contrary: its lifespan is (potentially)
>
expanded so that it exists *at least* till the current autorelease
>
pool is freed.
Indeed. As I already posted (although it hasn't got there yet), I was
mistaken. I'd be surprised if the lifespan were expanded unless you
did another -autorelease though.
Kind regards,
Alastair.
--
http://www.alastairs-place.net
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.