3 ms·
The problem I can see with specially tagging types like that is that you can't compose them within classes that use GC. The determinism is viral. You could mak
by pmjordan 16y ago
The problem I can see with specially tagging types like that is that you can't compose them within classes that use GC. The determinism is viral.
You could make it an error to rely on destruction for resource release, but what stops the programmer from wrapping the resource in an object of his own making, and freeing the resource in the wrapper's destructor? Walk the stack to check if the code is called from ANY destructor?