cocos2d-x 内存泄漏2
cocos2d\cocos\base/CCScriptSupport.cpp
{
ScriptEngineManager* ScriptEngineManager::getInstance()
{
if (!s_pSharedScriptEngineManager)
{
static ScriptEngineManager obj;
//s_pSharedScriptEngineManager = new (std::nothrow) ScriptEngineManager();
s_pSharedScriptEngineManager = &obj;
}
return s_pSharedScriptEngineManager;
}
void g_destroyInstance()
{
ScriptEngineManager::getInstance()->removeScriptEngine();
}
void ScriptEngineManager::destroyInstance()
{
g_destroyInstance();
//if (s_pSharedScriptEngineManager)
//{
// delete s_pSharedScriptEngineManager;
// s_pSharedScriptEngineManager = nullptr;
//}
}
}