Re: Sanity Check
Re: Sanity Check
- Subject: Re: Sanity Check
- From: Chris Hanson <email@hidden>
- Date: Wed, 07 Jul 2010 16:02:31 -0700
On Jul 7, 2010, at 1:25 PM, email@hidden wrote:
> Ok that was my concern. I am not assigning [[SewAndColorController alloc] init...] into a variable ergo I thought I should [self retain] and the release it when the panel is closed.
Better style would be to still assign the new instance of SewAndColorController to a variable, and release it when you’re done with the associated window.
If it’s intended to be a “shared” window that can be brought up and hidden, but needs to stay “alive” and of which there’s supposed to only be one instance, you’d probably be better off adding a +sharedSewAndColorController method that returns a singleton instance (allocating one if it doesn’t exist yet).
— Chris
_______________________________________________
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