• 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: Accessor methods and (auto)release: conclusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessor methods and (auto)release: conclusion


  • Subject: Re: Accessor methods and (auto)release: conclusion
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 6 Aug 2002 19:44:30 +0200

On Tuesday, August 6, 2002, at 07:36 , Marcel Weiher wrote:

...Deallocs should not have side-effects, they should just remove the object in question.

Oh, so eg. all those [[NSNotificationCenter defaultCenter] removeObserver:
self] in so many of my -deallocs are all wrong? Gee.

I think the sentence of yours is just not true. Deallocs should have as many sideeffects as needed for *proper removing the object in the environment it lives* -- including things like keeping observer list up to date, keeping any named lists (like the Window menu or whatever similar one might have in one's applicaiton) up to date, closing potential sockets the object might use, and who knows what more. Removing the object and (auto)releasing all its ivars is a very important part of it -- but just a part.
---
Ondra Hada
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.
  • Follow-Ups:
    • Re: Accessor methods and (auto)release: conclusion
      • From: Marcel Weiher <email@hidden>
References: 
 >Re: Accessor methods and (auto)release: conclusion (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Re: Accessor methods and (auto)release: conclusion
  • Next by Date: Re: Who is releasing my CFAllocator?
  • Previous by thread: Re: Accessor methods and (auto)release: conclusion
  • Next by thread: Re: Accessor methods and (auto)release: conclusion
  • Index(es):
    • Date
    • Thread