Re: Debugging retainCount
Re: Debugging retainCount
- Subject: Re: Debugging retainCount
- From: "Angela Brett" <email@hidden>
- Date: Tue, 15 Jul 2003 16:00:25 +1200 (NZST)
>
I've always kind of been of the opinion that releasing an already freed
>
object ought to be a non-fatal error, myself. But I'm sure there are
>
lots of good arguments on both side of that issue.
I know you didn't mean to start a debate on this issue, but think about
this consequence. That would mean something would have to be kept around
in place of that object in order to make sure nothing bad happened when
the same address was sent another release message. And if something else
is kept around in place of a deallocated object, that defeats the whole
point of deallocating the object since the memory is not available for
something else to use. The whole thing would be one big memory leak. Fine
for debugging I guess (I vaguely recall a setting which actually does this
-- NSZombieEnabled? I've never used it myself) but awful for a real
application.
At least sending a release message to nil is not an error. :&)
_______________________________________________
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.