mirror of https://github.com/axmolengine/axmol.git
fixed #1620: Invoking localStorageFree in the destructor of ScriptingCore. Added header file to cocos-ext.h
This commit is contained in:
parent
3fa771f0c4
commit
1d59a36ee9
|
@ -41,16 +41,18 @@
|
||||||
#include "network/HttpResponse.h"
|
#include "network/HttpResponse.h"
|
||||||
#include "network/HttpClient.h"
|
#include "network/HttpClient.h"
|
||||||
|
|
||||||
// Physics integration
|
// Physics integration
|
||||||
#if CC_ENABLE_CHIPMUNK_INTEGRATION
|
#if CC_ENABLE_CHIPMUNK_INTEGRATION
|
||||||
#include "physics_nodes/CCPhysicsDebugNode.h"
|
#include "physics_nodes/CCPhysicsDebugNode.h"
|
||||||
#include "physics_nodes/CCPhysicsSprite.h"
|
#include "physics_nodes/CCPhysicsSprite.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CC_ENABLE_BOX2D_INTEGRATION
|
|
||||||
#include "physics_nodes/CCPhysicsDebugNode.h"
|
|
||||||
#include "physics_nodes/CCPhysicsSprite.h"
|
|
||||||
#endif
|
#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__ */
|
#endif /* __COCOS2D_EXT_H__ */
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "jsdbgapi.h"
|
#include "jsdbgapi.h"
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
|
#include "cocos-ext.h"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
// for debug socket
|
// for debug socket
|
||||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
||||||
|
@ -465,6 +466,7 @@ JSBool ScriptingCore::runScript(const char *path, JSObject* global, JSContext* c
|
||||||
|
|
||||||
ScriptingCore::~ScriptingCore()
|
ScriptingCore::~ScriptingCore()
|
||||||
{
|
{
|
||||||
|
localStorageFree();
|
||||||
removeAllRoots(cx_);
|
removeAllRoots(cx_);
|
||||||
JS_DestroyContext(cx_);
|
JS_DestroyContext(cx_);
|
||||||
JS_DestroyRuntime(rt_);
|
JS_DestroyRuntime(rt_);
|
||||||
|
|
Loading…
Reference in New Issue