local variables of static member functions

后端 未结 4 1265
终归单人心
终归单人心 2021-02-19 06:25

Today we came accross a problem concerning static member functions in an multithreaded environment. The question we asked ourselves and couldn\'t find a satisfying answer is: ar

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-19 06:49

    Unless explicitly declared as static, no they're not. They're on a stack, and each thread has a separate stack.

提交回复
热议问题