Re: Disappearing NSStatusItem
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