Tencent / TscanCode

A static code analyzer for C++, C#, Lua
Other
2.01k stars 591 forks source link

成员变量引用栈空间问题 #2

Closed viennadd closed 6 years ago

viennadd commented 7 years ago

193

public:
    /** @brief This constructor is used when registering this class */
    CheckMemoryLeakInFunction() : Check(myName()), CheckMemoryLeak(0, 0, Standards()), symbolDatabase(NULL)
    { }

CheckMemoryLeak(0, 0, Standards()) 构造函数把Standards()临时栈空间绑到 standard 引用里了,可能会发生问题。