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 (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