Re: NSStatusBar generates Sigtrap
Re: NSStatusBar generates Sigtrap
- Subject: Re: NSStatusBar generates Sigtrap
- From: Todd Yandell <email@hidden>
- Date: Tue, 2 Aug 2005 10:43:39 -0500
Hi,
The code crashes because some object or objects are expecting there
to be an autorelease pool available, but there is not. Normally
NSApplication (or someone) creates it for you, but you're not using
that in your app. So, to fix it you just need to create your own
autorelease pool:
1. At the beginning of your code, before you call any methods, add:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
2. At the end of your code, before you return, add:
[pool release];
Hope that helps,
Todd
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden