• 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: cmd-q versus menu item quit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cmd-q versus menu item quit


  • Subject: Re: cmd-q versus menu item quit
  • From: Milton Sagen <email@hidden>
  • Date: Tue, 11 May 2004 13:39:25 -0700

The simplest explanation is to say that I have a temporary file that an object in the window deletes when its dealloc'd. The object is dealloc'd when the user quits with the cmd-q but not when quitting via the menu item, hence in the former case the file is removed but not in the latter. I already have an application delegate method appllicationShouldTerminate as well as applicationWilllTerminate but short of getting the object directly and calling dealloc, which doesn't sound like a good idea, I haven't been able to get the two case to behave similarly.

On Tuesday, May 11, 2004, at 10:33 US/Pacific, Stephane Sudre wrote:


On mardi, mai 11, 2004, at 05:49 PM, Milton Sagen wrote:

When I quit via the key equivalent cmd-q all the objects associated with my window get dealloc'd such as an NSOutlineView, however, when I quit by selecting the quit menu item, even though my code "seems" to follow the same path, the objects don't get dealloc'd. Its as if they are never placed into an autorelease pool or the pool is itself never released. Has anybody else seen this and know how to get the quit menu item selection to behave the same as cmd-q?

Are you doing something specific in some dealloc methods to need this?

If this is the case, maybe a solution is to do this in the applicationWillTerminate: "notification".
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: cmd-q versus menu item quit
      • From: Nick Zitzmann <email@hidden>
References: 
 >Re: cmd-q versus menu item quit (From: Stephane Sudre <email@hidden>)

  • Prev by Date: Views, scrolling, zoom and detail
  • Next by Date: RE: [Array writeToFile:Path atomically:YES]
  • Previous by thread: Re: cmd-q versus menu item quit
  • Next by thread: Re: cmd-q versus menu item quit
  • Index(es):
    • Date
    • Thread