• 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
NSAutoreleasePool causes crashes when empty?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSAutoreleasePool causes crashes when empty?


  • Subject: NSAutoreleasePool causes crashes when empty?
  • From: "Kevin Dixon" <email@hidden>
  • Date: Thu, 3 Apr 2008 20:42:06 -0400 (EDT)
  • Importance: Normal

I have a method in my class that's a thread entry point, using
detachNewThreadSelector. According to the docs, I create an
NSAutoreleasePool and release it at the end of the thread's life (right
before [NSThread exit].

The thread calls a single routine from another class. Sometimes this
routine aborts before allocating any objects that would be autoreleased
(due to an error situation). I notice when this is the case, calling [pool
release] causes a crash, but if the objects are allocated normally due to
the full run of the function, then no crash occurs.

Is there a way I can query the pool to see if it needs to be released, or
should I implement some sort of return code from my other function to see
if I should release the pool or not.

Thanks,

-Kevin
_______________________________________________

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

  • Follow-Ups:
    • Re: NSAutoreleasePool causes crashes when empty?
      • From: Scott Ribe <email@hidden>
    • Re: NSAutoreleasePool causes crashes when empty?
      • From: John Stiles <email@hidden>
  • Prev by Date: Re: Modify Input in NSTableView
  • Next by Date: Re: NSAutoreleasePool causes crashes when empty?
  • Previous by thread: Re: Modify Input in NSTableView
  • Next by thread: Re: NSAutoreleasePool causes crashes when empty?
  • Index(es):
    • Date
    • Thread