We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
CCLayer unregisterScriptHandler lead to LUA table TOLUA_REFID_FUNCTION_MAPPING memory leak
CCLayer unregisterScriptHandler lead to LUA table TOLUA_REFID_FUNCTION_MAPPING memory leak
SORRY, ORRIANAL TEXT
“but on call registerScriptHandler method” IS WRONG!
DODIFY:
“but on call unregisterScriptHandler method”
WOW…OK. PLEASE CLOSE THE TICKET.
in some Objects just like CCLayer,
unregisterScriptHandler method trigger ScriptHandlerEntry instance release,
and on ScriptHandlerEntry instance destruct, call the toluafix_remove_function_by_refid method.
BUT, other some Objects like CCItem,
in unregisterScriptHandler direct call the toluafix_remove_function_by_refid method.
HOPE FOR UNIFORM STYLE.
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8275
Status: | Closed | |
---|---|---|
Start date: | 2013-12-04 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | lua, native client | |
Target version: | - |
on called CCLayer some registerScriptHandler method,
just like registerScriptTouchHandler method,
it’s auto call toluafix_ref_function method,
save the callback argument into TOLUA_REFID_FUNCTION_MAPPING table.
but on call registerScriptHandler method,
it’s don’t auto call toluafix_remove_function_by_refid method
to delete before saved callback argument. it’s only release scriptHandlerEntry.
THE PROBLEM LEAD TO LUA TABLE “TOLUA_REFID_FUNCTION_MAPPING” MEMORY LEAK!
I THINK NEED TO MODIFY LIKE: