• 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: which cocoa objects to dealloc ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: which cocoa objects to dealloc ?


  • Subject: Re: which cocoa objects to dealloc ?
  • From: j o a r <email@hidden>
  • Date: Sat, 18 Mar 2006 15:29:35 +0100


On 18 mar 2006, at 13.55, Ondra Cada wrote:

... That said, I would still strongly suggest that you do, because it's a good habit to get into! I always dutifully implement correct dealloc methods in all classes.

I respectfully disagree with j o a r in this: in my opinion, writing deallocs brings hardly any benefit unless you really need them. And the time spared by not writing them for classes whose instances are never deallocated anyway you can invest in a much better way :)

OK, perhaps you're right. I would however at the very least add _something_ in place of the regular dealloc implementation. Perhaps an assertion / exception inside the dealloc method, or simply a commented out stub of dealloc, and an explanation of why it's not implemented. It should be made clear that there is a special reason why it's not implemented, and that it's a conscious decision.


j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >which cocoa objects to dealloc ? (From: Karim Morsy <email@hidden>)
 >Re: which cocoa objects to dealloc ? (From: j o a r <email@hidden>)
 >Re: which cocoa objects to dealloc ? (From: Karim Morsy <email@hidden>)
 >Re: which cocoa objects to dealloc ? (From: j o a r <email@hidden>)
 >Re: which cocoa objects to dealloc ? (From: Karim Morsy <email@hidden>)
 >Re: which cocoa objects to dealloc ? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: which cocoa objects to dealloc ?
  • Next by Date: Release build fails (Debug works)
  • Previous by thread: Re: which cocoa objects to dealloc ?
  • Next by thread: Re: which cocoa objects to dealloc ?
  • Index(es):
    • Date
    • Thread