Cocos2d:jsb:error:file/users/dcx_jd/documents/cocos2d-x-2.2.2/scripting/javascript/bindings/generated/jsb_ cocos2dx_auto.cpp:line:4911, Function:js_cocos2dx_ccnode_removefromparentandcleanup
Cocos2d:invalid Native Object
Cocos2d:js:/var/mobile/applications/xxxxxx/documents/xxx/package/src/xxx/xxx/xxx/xxx:52:error:invalid Native Object
Above is the bug error message, appears invalid Native object This situation, the current encounter is caused by the display object, here is the process:
After you create an animated armature in a method, push to an array, then let the animation play the specified action, and then let Armature.removefromparent (TRUE) after the monitor hears the complete event of the animation.
Then in the final Destory, the Armature object is accessed by iterating through the array, at which point the armature.getparent () or armature.removefromparent (true) is reported invalid Native Obejct's error.
The solution is that after the animation complete, only removefromeparent is not possible, but also at this time to remove armature from the array, do not have any place on its reference, thus directly destroyed, destory in fact no longer deal with