• 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: Cocoa applications and exit codes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa applications and exit codes


  • Subject: Re: Cocoa applications and exit codes
  • From: Andrew Farmer <email@hidden>
  • Date: Mon, 22 Nov 2004 11:21:18 -0800

On 22 Nov 2004, at 00:53, Gregor Nobis wrote:
Andrew Farmer wrote:
/* it's simpler than you think */
exit(exitcode);

Sounds like it should work. ;)

But does this terminate the Cocoa app all right? Does, for example, the delegate's applicationShouldTerminate: method get called? I'd like to smoothly quit NSApplication.

Nope... so make sure you clean up everything manually first.

Keep in mind, though, that there's nothing wrong with not releasing everything before you quit. As long as you don't have any files you need to write or delete before you quit, exit()ing directly is just fine.

Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
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: 
 >Cocoa applications and exit codes (From: Gregor Nobis <email@hidden>)
 >Re: Cocoa applications and exit codes (From: Andrew Farmer <email@hidden>)
 >Re: Cocoa applications and exit codes (From: Gregor Nobis <email@hidden>)

  • Prev by Date: Re: Class name
  • Next by Date: Applescript
  • Previous by thread: Re: Cocoa applications and exit codes
  • Next by thread: NSTableView: preventing drag image slideback
  • Index(es):
    • Date
    • Thread