Re: retain, copy, release, autorelease...leak
Re: retain, copy, release, autorelease...leak
- Subject: Re: retain, copy, release, autorelease...leak
- From: Robert Lee Dotson <email@hidden>
- Date: Thu, 28 Jun 2001 17:03:37 -0400
Natch. I meant, you never need to call release on objects that have been
autoreleased. Only on the objects where you've specifically called
retain. I can think of few reasons to call retain, since objects stick
around when passed as return values or added to collection classes.
On Thursday, June 28, 2001, at 04:52 PM, Finlay Dobbie wrote:
On Thursday, June 28, 2001, at 09:32 pm, email@hidden wrote:
You do not need to retain or release objects created with class
methods (arrayWithCapacity: is a class method for NS*Array), only
those created with [[... alloc] init*:] methods.
Uhm, this is incorrect. You need to retain them if you want them to
stick around, and then release them when you want them to go away if
they have been retained.
-- Finlay
-- Robert Lee Dotson
"Let us never negotiate out of fear but never let us fear to negotiate."
--John F. Kennedy