diff --git a/cocos2dx/script_support/CCScriptSupport.cpp b/cocos2dx/script_support/CCScriptSupport.cpp index 075d7103c7..d358f88c27 100644 --- a/cocos2dx/script_support/CCScriptSupport.cpp +++ b/cocos2dx/script_support/CCScriptSupport.cpp @@ -136,7 +136,7 @@ void ScriptEngineManager::removeScriptEngine(void) } } -ScriptEngineManager* ScriptEngineManager::sharedManager(void) +ScriptEngineManager* ScriptEngineManager::getInstance() { if (!s_pSharedScriptEngineManager) { @@ -145,7 +145,7 @@ ScriptEngineManager* ScriptEngineManager::sharedManager(void) return s_pSharedScriptEngineManager; } -void ScriptEngineManager::purgeSharedManager(void) +void ScriptEngineManager::destroyInstance() { if (s_pSharedScriptEngineManager) { diff --git a/cocos2dx/script_support/CCScriptSupport.h b/cocos2dx/script_support/CCScriptSupport.h index 26f9a55c0c..bc867ae4a8 100644 --- a/cocos2dx/script_support/CCScriptSupport.h +++ b/cocos2dx/script_support/CCScriptSupport.h @@ -350,8 +350,11 @@ public: void setScriptEngine(ScriptEngineProtocol *pScriptEngine); void removeScriptEngine(void); - static ScriptEngineManager* sharedManager(void); - static void purgeSharedManager(void); + static ScriptEngineManager* getInstance(); + static void destroyInstance(); + + CC_DEPRECATED_ATTRIBUTE static ScriptEngineManager* sharedManager() { return ScriptEngineManager::getInstance(); }; + CC_DEPRECATED_ATTRIBUTE static void purgeSharedManager() { ScriptEngineManager::destroyInstance(); }; private: ScriptEngineManager(void)