• 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: NSStatusBar generates Sigtrap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSStatusBar generates Sigtrap (From: Michael Gruetzner <email@hidden>)

  • Prev by Date: Re: NSDate: dates before the year 100
  • Next by Date: Re: Vu-meter
  • Previous by thread: Re: NSStatusBar generates Sigtrap
  • Next by thread: NSOutlineView and NSTreeController
  • Index(es):
    • Date
    • Thread