• 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
NSApplication memory bugs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSApplication memory bugs


  • Subject: NSApplication memory bugs
  • From: Justin Kolb <email@hidden>
  • Date: Fri, 22 Jul 2005 23:58:48 -0500

Will the stop method of NSApplication ever be fixed? Calling it causes leaked memory and can cause crashes in programs that override the run method. The terminate method bypasses the NSApplication normal release (dealloc is never called). It seems to me that the foundation of every Cocoa program is a bit shaky if the main classes used are not handling memory correctly.

The simplest example of this behavior is in shown in "http://www.nutzy.net/bug.tar.gz";. Lately when trying more complicated programs I've gotten even more serious errors: signals 5, 10, and 11 caused by my last NSAutoReleasePool trying to release a NSWindow instance that I myself never sent an autorelease message to and that I release on my own. Just for kicks I don't release the window and get a different signal error. Of course calling terminate works because it exits the program immediately so it never gets to call release on the last pool and everything seems to work fine.

Most people probably never realize there is a problem because no one uses stop, few override the run method of NSApplication, and terminate silently hides the errors.

_______________________________________________
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


  • Prev by Date: Mail.app Blue Sidebar
  • Next by Date: Swapping toolbars
  • Previous by thread: Re: Mail.app Blue Sidebar
  • Next by thread: Swapping toolbars
  • Index(es):
    • Date
    • Thread