• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sanity Check
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Sanity Check
      • From: email@hidden
References: 
 >Fwd: Sanity Check (From: email@hidden)

  • Prev by Date: NSWindowController window returns nil
  • Next by Date: Re: Sanity Check
  • Previous by thread: Fwd: Sanity Check
  • Next by thread: Re: Sanity Check
  • Index(es):
    • Date
    • Thread