Re: NSApplication delegate not released on quit?
Re: NSApplication delegate not released on quit?
- Subject: Re: NSApplication delegate not released on quit?
- From: Henry McGilton <email@hidden>
- Date: Fri, 13 Jun 2003 23:32:30 -0700
On Friday, June 13, 2003, at 10:42 PM, Hsu wrote:
So all your singleton objects should register themselves to the
NSApplicationWillTerminateNotification to free themselves? Or a
message should be sent to classes to do it? I'm pretty sure there are
more interesting and useful things to do in your code than that. I
don't see why admitting that some "immortal" objects live until the
application dies is such a big deal. Think of it as another kind of
contract, and you're done.
This is great until you decide to use that object somewhere else, for
some other reason, and then it starts leaking...
In the context of Marco's post on this subject, I am not sure
how you are supposed to use 'that object' 'somewhere else'
when the entire application has been shut down, the memory
has been re-claimed, the horse has been shot, and the barn
doors have been shut.
Alternatively, you might have been alluding to using a class
in a context where that class needs to pay attention to
proper disposal of its retained objects and its allocated
memory.
If you meant the latter case, I agree with your sentiments,
but it was not clear from the posting.
Best Wishes,
........ Henry
===============================+============================
Henry McGilton, Boulevardier | Trilithon Software
Objective-C/Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden |
http://www.trilithon.com
|
===============================+============================
_______________________________________________
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.