Re: Deallocation in Cocoa [greenhorn]
Re: Deallocation in Cocoa [greenhorn]
- Subject: Re: Deallocation in Cocoa [greenhorn]
- From: Ondra Cada <email@hidden>
- Date: Mon, 21 Oct 2002 14:26:56 +0200
On Monday, October 21, 2002, at 01:54 , David Remahl wrote:
The other conclusion from the old thread was that any cleanup other than
deallocation of memory, should not be done in dealloc, but somewhere else,
for example as a response to the notification sent when NSApplication is
terminating.
It's a bit more complicated in generic case (dealloc should clean up
completely, *bu* you should not depend on that, since it can be called
lately or never), but with app-level controller objects the thing is very
simple: they are effectively constant objects, created at beginning and
never freed. Myself, I don't even bother to implement -dealloc for
app-level controllers. If there's any app-level cleanup, the notification/
delegate message (which tends to be the same in this case) is the way.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.