When I kill a pThread in C++, do destructors of objects on stacks get called?

后端 未结 4 1050
悲&欢浪女
悲&欢浪女 2021-01-02 01:54

I\'m writing a multi-threaded C++ program. I plan on killing threads. However, I am also using a ref-counted GC. I\'m wondering if stack allocated objects get destructed whe

4条回答
  •  半阙折子戏
    2021-01-02 02:49

    I doubt it - pthread is a pure C api, so I doubt it would have any mechanism to unwind the stack of the thread.

提交回复
热议问题