Re: Methods that return autoreleased objects?
Re: Methods that return autoreleased objects?
- Subject: Re: Methods that return autoreleased objects?
- From: "Adam R. Maxwell" <email@hidden>
- Date: Sun, 29 Jun 2008 09:55:55 -0700
On Jun 29, 2008, at 9:42 AM, Mike Ferris wrote:
Best thing to do about the top-level nib "exception" to the rule is
to use NSWindowController or NSViewController to do your nib
loading. These classes properly take responsibility for top-level
objects of the nibs they load and then all you have to do is manage
the lifetime of the controller object as you normally would.
True, although that can make it more confusing when you actually have
to manage top-level objects yourself (I've had to do it a few times).
And, as long as we're on the topic... who can name the only other
exceptional case for the "release only if you alloc,new, copy or
retain" rule? (It's pretty old-school...)
How about error strings returned by reference from
NSPropertyListSerialization?
--
Adam
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden