cc.game.restart() 在 cocos2d-js 3.10 中扩展 sdkbox 时进行 carsh

cc.game.restart() carsh when extend sdkbox in cocos2d-js 3.10

我有问题需要帮助。哦,我意识到不仅每个sdkbox facebook而且只安装一个sdkbox插件(如facebook,onesignal ...),调用时都崩溃了cc.game.restart()

在AppDelegate.cpp中:

#ifdef SDKBOX_ENABLED
    sc->addRegisterCallback(register_all_PluginFacebookJS);
    sc->addRegisterCallback(register_all_PluginFacebookJS_helper);
#endif
    sc->addRegisterCallback(register_all_SpriteExJS);
    sc->start();
    sc->runScript("script/jsb_boot.js");

谢谢

我重现了同样的错误并修复了它 在 ScriptingCore.cpp 中使用以下代码:

void ScriptingCore::cleanup()
...

if(iter->first.compare(0,8,"N6sdkbox") != 0){
      free(iter->second->jsclass);
      free(iter->second);
}