Under what circumstances are C++ destructors not going to be called?

前端 未结 8 855
-上瘾入骨i
-上瘾入骨i 2020-12-02 08:52

I know that my destructors are called on normal unwind of stack and when exceptions are thrown, but not when exit() is called.

Are there any other cases where my des

8条回答
  •  抹茶落季
    2020-12-02 09:42

    abort terminates program without executing destructors for objects of automatic or static storage duration as Standard says. For other situations you should read implementation specific documents.

提交回复
热议问题