Re: Sanity Check
Re: Sanity Check
- Subject: Re: Sanity Check
- From: email@hidden
- Date: Wed, 7 Jul 2010 17:09:40 -0600
Thank you Chris!
Even though it would be better style would my approach cause any
problem? I don't see any.
-koko
On Jul 7, 2010, at 5:02 PM, Chris Hanson wrote:
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