Re: When is my delegate released?
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.