Re: Memory management question
Re: Memory management question
- Subject: Re: Memory management question
- From: Ondra Cada <email@hidden>
- Date: Thu, 25 Mar 2004 00:38:34 +0100
Alastair,
On Thursday, Mar 25, 2004, at 00:20 Europe/Prague, Alastair Houghton
wrote:
id o = [[foo getter] retain];
// code here
// o used now
[o release];
which avoids an unnecessary autorelease :-)
... making the code also a possible leaker (which is not too
important), and *MUCH* more error-prone, which is generally *far far*
worse than the very slight autorelease overhead.
No, don't. This is generally a wrong pattern.
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.