• 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: Disappearing NSStatusItem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disappearing NSStatusItem


  • Subject: Re: Disappearing NSStatusItem
  • From: Jacob Schwartz <email@hidden>
  • Date: Fri, 25 Sep 2009 19:53:57 -0400

Yeah, I threw in a release statement after and it didn't do anything different. When I read your reply, I thought what Bill said, that garbage collection was different from release/retain statements.

-Jake Schwartz

On Sep 25, 2009, at 7:33 PM, Bill Bumgarner wrote:


On Sep 25, 2009, at 4:30 PM, BravoBug Software wrote:

Make sure you're properly -retain'ing it. Just because you have an
ivar pointing to it doesn't mean it will stick around after
GC/autorelease pool releases stuff. You'll need to explicitly -retain
the NSStatusItem since NSStatusBar does not.

Yes-- you need to explicitly retain anything you want to keep around when running under retain/release. Or you need a strong reference to it (or CFRetain it) if running under GC.


However, the rest of the answer is very confusing. An objective-c program runs either garbage collected or using retain/release.

"GC/autorelease" doesn't make any sense.

b.bum




_______________________________________________

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


References: 
 >Disappearing NSStatusItem (From: Jacob Schwartz <email@hidden>)
 >Re: Disappearing NSStatusItem (From: BravoBug Software <email@hidden>)
 >Re: Disappearing NSStatusItem (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Suggestions for debugging “EXC_BAD_ACCESS” [SOLVED]
  • Next by Date: Re: Suggestions for debugging “EXC_BAD_ACCESS” [SOLVED]
  • Previous by thread: Re: Disappearing NSStatusItem
  • Next by thread: Parsing error in NSEvent?
  • Index(es):
    • Date
    • Thread