diff --git a/extensions/cocos-ext.h b/extensions/cocos-ext.h index 3a5e92d30e..bb0de6ce1c 100644 --- a/extensions/cocos-ext.h +++ b/extensions/cocos-ext.h @@ -41,16 +41,18 @@ #include "network/HttpResponse.h" #include "network/HttpClient.h" -// Physics integration -#if CC_ENABLE_CHIPMUNK_INTEGRATION -#include "physics_nodes/CCPhysicsDebugNode.h" -#include "physics_nodes/CCPhysicsSprite.h" -#endif - -#if CC_ENABLE_BOX2D_INTEGRATION -#include "physics_nodes/CCPhysicsDebugNode.h" -#include "physics_nodes/CCPhysicsSprite.h" +// Physics integration +#if CC_ENABLE_CHIPMUNK_INTEGRATION +#include "physics_nodes/CCPhysicsDebugNode.h" +#include "physics_nodes/CCPhysicsSprite.h" #endif +#if CC_ENABLE_BOX2D_INTEGRATION +#include "physics_nodes/CCPhysicsDebugNode.h" +#include "physics_nodes/CCPhysicsSprite.h" +#endif + +#include "LocalStorage/LocalStorage.h" + #endif /* __COCOS2D_EXT_H__ */ diff --git a/scripting/javascript/bindings/ScriptingCore.cpp b/scripting/javascript/bindings/ScriptingCore.cpp index 488e00d510..7b55ba7112 100644 --- a/scripting/javascript/bindings/ScriptingCore.cpp +++ b/scripting/javascript/bindings/ScriptingCore.cpp @@ -16,6 +16,7 @@ #include "ScriptingCore.h" #include "jsdbgapi.h" #include "cocos2d.h" +#include "cocos-ext.h" #include "cocos2d_specifics.hpp" // for debug socket #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) @@ -465,6 +466,7 @@ JSBool ScriptingCore::runScript(const char *path, JSObject* global, JSContext* c ScriptingCore::~ScriptingCore() { + localStorageFree(); removeAllRoots(cx_); JS_DestroyContext(cx_); JS_DestroyRuntime(rt_);