Re: Memory management question
Re: Memory management question
- Subject: Re: Memory management question
- From: Alastair Houghton <email@hidden>
- Date: Thu, 25 Mar 2004 09:17:46 +0000
On 24 Mar 2004, at 23:40, Ondra Cada wrote:
>
Bjoern,
>
>
On Wednesday, Mar 24, 2004, at 23:20 Europe/Prague, Bjoern Kriews
>
wrote:
>
>
>> [[someObject retain] release];
>
>>
>
>> (The -retain increments the reference count, removing it from the
>
>> autorelease pool, then the -release triggers the deallocation of the
>
>> object.)
>
>
>
> I find this a little bit disturbing because I was under the impression
>
> that a retain/release pair would leave the object in the exact same
>
> state regarding memory management.
>
>
Would. I am *terribly sorry*; the code should have been
>
>
[[someObject retain] autorelease];
>
>
(which self-evidently was meant to by the original writer, and I,
>
supposing so, did not note there's the mistake.)
No, don't apologise. The original message was wrong.
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.