refactor Profiler startup/shutdown (#11105)

This commit is contained in:
minggo
2022-05-16 11:36:33 +08:00
committed by GitHub
parent 17874c6fbd
commit b6debf5d3f
4 changed files with 12 additions and 20 deletions
+2 -2
View File
@@ -101,7 +101,7 @@ Engine::Engine() {
se::ScriptEngine::getInstance();
#if CC_USE_PROFILER
Profiler::getInstance();
_profiler = new Profiler();
#endif
}
@@ -123,7 +123,7 @@ Engine::~Engine() {
Root::getInstance()->destroy();
#if CC_USE_PROFILER
Profiler::destroyInstance();
delete _profiler;
#endif
DebugRenderer::destroyInstance();
FreeTypeFontFace::destroyFreeType();