Re: Memory management question
Re: Memory management question
- Subject: Re: Memory management question
- From: Alastair Houghton <email@hidden>
- Date: Wed, 24 Mar 2004 23:20:57 +0000
On 24 Mar 2004, at 22:32, Ondra Cada wrote:
>
Nevertheless, I take it you are well aware of this part of the
>
argument too, and am writing this message actually just for the
>
benefit of other readers (who are truly invited to check the archives,
>
where all the arguments of both sides are stated--many times over ;)
Indeed. That's why I put a link to the archives in my previous message.
[snip]
>
and wherever there is the slightest suspicion the (*) code may,
>
whatever indirectly or in future releases, cause the setter to be
>
called, one should always use the safe pattern
>
>
id o=[[[foo getter] retain] autorelease];
>
// any code here
>
// o used now
or
id o = [[foo getter] retain];
// code here
// o used now
[o release];
which avoids an unnecessary autorelease :-)
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.