• 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: When is my delegate released?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When is my delegate released?


  • Subject: Re: When is my delegate released?
  • From: Allan Odgaard <email@hidden>
  • Date: Sun, 7 Jul 2002 14:43:47 +0200

On sxndag, juli 7, 2002, at 02:18 , Finlay Dobbie wrote:

As of such, most of my apps have their controller instantiated in the Nib-file, but should I react on "applicationWillTerminate" or similar, and then call release on my delegate?
You probably don't need to worry, as when your application quits all the memory it used is automatically reclaimed.

I'm from the old school who does worry about these things... also, some stuff like saving files, unregistering hotkeys, taking down public NSConnections or similar really ought to be done when the application is shutdown.

And, in one application I have a one shot window in an external nib file with its own controller, I haven't really grasped the correct procedure to handle this gracefully. I've set "release when close" for the window, so I assume that it gets released correctly when my window close. But that doesn't take care of the delegate: I'd assume calling release when being notified about the window closing is bad, because there might be some last notifications sent to the delegate (like window has now closed) -- but maybe I could just setDelegate:nil on the window first...
_______________________________________________
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: When is my delegate released?
      • From: James DiPalma <email@hidden>
    • Re: When is my delegate released?
      • From: Finlay Dobbie <email@hidden>
References: 
 >Re: When is my delegate released? (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: accessor generation???
  • Next by Date: Human readable file type?
  • Previous by thread: Re: When is my delegate released?
  • Next by thread: Re: When is my delegate released?
  • Index(es):
    • Date
    • Thread