Re: which cocoa objects to dealloc ?
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