• 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: Deallocation in Cocoa [greenhorn]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Re: Deallocation in Cocoa [greenhorn] (From: David Remahl <email@hidden>)

  • Prev by Date: Re: Deallocation in Cocoa [greenhorn]
  • Next by Date: Odd Frameworks
  • Previous by thread: Re: Deallocation in Cocoa [greenhorn]
  • Next by thread: Re: Deallocation in Cocoa [greenhorn]
  • Index(es):
    • Date
    • Thread