• 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: 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


  • Follow-Ups:
    • Re: Sanity Check
      • From: Ken Thomases <email@hidden>
References: 
 >Fwd: Sanity Check (From: email@hidden)
 >Re: Sanity Check (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Sanity Check
  • Next by Date: Programmatically closing a submenu (NSMenu)
  • Previous by thread: Re: Sanity Check
  • Next by thread: Re: Sanity Check
  • Index(es):
    • Date
    • Thread