On Jul 7, 2010, at 1:25 PM, k...@highrolls.net 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to