Event class should be new ed.

This commit is contained in:
James Chen
2017-08-10 16:56:03 +08:00
parent e719caa583
commit 2f8bc2529e
4 changed files with 16 additions and 10 deletions
@@ -102,8 +102,10 @@ JNIEXPORT void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, j
cocos2d::DrawPrimitives::init();
cocos2d::VolatileTextureMgr::reloadAllTextures();
cocos2d::EventCustom recreatedEvent(EVENT_RENDERER_RECREATED);
director->getEventDispatcher()->dispatchEvent(&recreatedEvent);
cocos2d::EventCustom* recreatedEvent = new (std::nothrow) cocos2d::EventCustom(EVENT_RENDERER_RECREATED);
director->getEventDispatcher()->dispatchEvent(recreatedEvent);
recreatedEvent->release();
director->setGLDefaultValues();
}
cocos2d::network::_preloadJavaDownloaderClass();