4 ms·
> There is no way to statically guarantee that the method isn’t called twice, that’s up to the user. That sounds like "re-animation", where a destructor leaks
by Animats 4y ago
> There is no way to statically guarantee that the method isn’t called twice, that’s up to the user.
That sounds like "re-animation", where a destructor leaks something to the outside that keeps the object from being destructed. That was in Microsoft Managed C++, and it was similarly awful.
If all you want to do is clean up something on deletion, how about passing the thing that needs cleanup to a channel, to be handled by another task?