4 ms·
> Don't do anything in a destructor that can fail or block. Like closing files opened for writing. I'd like to know more about this. That means to RAII file t
by ndesaulniers 10y ago
> Don't do anything in a destructor that can fail or block. Like closing files opened for writing.
I'd like to know more about this. That means to RAII file types?
- Animats 10y agoRead this: [1] In C++11, exceptions in destructors have defined semantics, but those semantics are very complicated. Prior to C++11, the semantics were not well defined. [1] https://akrzemi1.wordpress.com/2011/09/21/destructors-that-throw/ https://akrzemi1.wordpress.com/2011/09/21/destructors-that-t...