mirror of https://github.com/axmolengine/axmol.git
closed #2535: TouchScriptHandlerEntry will release twice lua reference
This commit is contained in:
parent
23082c0d6c
commit
68eaa746ea
|
@ -53,7 +53,12 @@ ScriptHandlerEntry* ScriptHandlerEntry::create(int handler)
|
|||
|
||||
ScriptHandlerEntry::~ScriptHandlerEntry(void)
|
||||
{
|
||||
if (_handler != 0 )
|
||||
{
|
||||
ScriptEngineManager::getInstance()->getScriptEngine()->removeScriptHandler(_handler);
|
||||
LUALOG("[LUA] Remove event handler: %d", _handler);
|
||||
_handler = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// #pragma mark -
|
||||
|
@ -101,8 +106,6 @@ TouchScriptHandlerEntry* TouchScriptHandlerEntry::create(int handler,
|
|||
|
||||
TouchScriptHandlerEntry::~TouchScriptHandlerEntry(void)
|
||||
{
|
||||
ScriptEngineManager::getInstance()->getScriptEngine()->removeScriptHandler(_handler);
|
||||
LUALOG("[LUA] Remove touch event handler: %d", _handler);
|
||||
}
|
||||
|
||||
bool TouchScriptHandlerEntry::init(bool isMultiTouches, int priority, bool swallowsTouches)
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~ScriptHandlerEntry(void);
|
||||
virtual ~ScriptHandlerEntry();
|
||||
|
||||
int getHandler(void) {
|
||||
return _handler;
|
||||
|
@ -103,7 +103,7 @@ public:
|
|||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~SchedulerScriptHandlerEntry(void);
|
||||
virtual ~SchedulerScriptHandlerEntry();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
@ -162,7 +162,7 @@ public:
|
|||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~TouchScriptHandlerEntry(void);
|
||||
virtual ~TouchScriptHandlerEntry();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
|
Loading…
Reference in New Issue