Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Adding Spit and Polish to Your Cocoa App
Subject:   OT: help with dealloc
Date:   2002-06-25 14:23:11
From:   blukens
I'm still working my way through the older articles here, but I didn't figure anyone would bother to check them for new messages. I'm playing with the AddressBook app, but it doesn't seem to be executing my dealloc instructions when the app quits. I tried downloading mike's version, and dropped an NSLog in dealloc, but I get nothing from that either. So, how does one specify commands to be executed when an app quits?
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Michael Beam photo OT: help with dealloc
    2002-06-27 08:38:11  Michael Beam | O'Reilly Author [View]

    Actually, this question is very on-topic. The answer to your question is to implement in your application delegate the NSApplication delegate method -applicationWillTerminate:. This method will be invoked immediately before the application quits, so it will suit your needs.

    BTW, as far as I'm concerned, if anyone is reading through previous columns, and has a question, the most recent talk back is a perfectly good place for those questions. This applies to any general Cocoa programming questions you may have too.

    Mike