http://en.cppreference.com/w/cpp/utility/program/longjmp
No destructors for automatic objects are called. If replacing of std::longjmp
with throw and setjmp with catchwould execute a non-trivial destructor for any automatic object, the behavior of such std::longjmp
is undefined.
longjmp를 쓰면 destructor가 안 불리네.
C++에서는 throw, catch를 써야 한다. (malloc, free 대신에 new, delete를 쓰는 것처럼)