Re:Misra C++:2023 Published
by GrumpySloth on Monday December 18, 2023 @02:12PM
(#38686835)
If you call mmap/VirtualAlloc/open/fopen in your constructor and later it throws, you will have a resource leak, because the destructor won’t clean it up.
[ Parent
| on HN ]
If you don't know how to write exception-safe code -- for which RAII is the most common idiom -- then you have exception safety issues.
I don't see how that relates to the thread, other than to say exceptions in constructors are quite fundamental.