Re:In the C++ bag of tricks: scoped locks
by dllthomas on Friday February 07, 2014 @03:24PM
(#7198497)
Actually, it looks like C++ destructors don't run on longjmp either, though that's less of an issue since C++ actually has real exceptions.
[ Parent
| on HN ]
longjmp is what the library and standards writers refer to as a "non-local goto" so it's kind of to be expected that it would manage to bypass destructors (I'm not sure how you'd unwind the stack enough to ensure that you've destructed everything created since the corresponding setjmp).