Rick and Mark,
Here you display some of the reasons that I made this proposal!
And I must say I've never been comfortable with the concept of issuing a command, having it *appear* to have executed it function, only to find out (indirectly) that it did *NOTHING*.
I still *suggest* that if release released as commanded, then it would be much much **EASIER** to find the "bug" that some later reference is being made in the code.
Cheers,
Jim N
>>If you want a good idea try it in C++ by calling the destructor directly
>>from within a class method <s>...
>
>Actually, calling a destructor explicitly won't do any real harm (depending on what the destructor actually does, of course). It's just code. It doesn't release memory (unless that's what you wrote inside it).
>
>However, calling
>
> delete this;
>
>can have effects (you can execute code after it, but should not access any properties or call any virtual methods). Nevertheless, it's the correct solution in some cases.
>
>>>Yeah, but you're not talking about external release!
>
>No, we're talking about a Release() method that simply does RELEASE THIS.
>
>It's too bad Steven Black isn't around to comment on this. He's the first guy I saw to suggest it, after extensive testing (and hair-pulling).
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only