MCPcopy Create free account
hub / github.com/axmolengine/axmol / cleanupDirector

Method cleanupDirector

core/base/Director.cpp:1119–1138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1117}
1118
1119void Director::cleanupDirector()
1120{
1121 reset();
1122
1123 // If any graphics resources not cleanup or leaked, will crash on linux when destroy graphics context,
1124 // so we should cleanup any graphics resources.
1125 AX_SAFE_DELETE(_renderer);
1126 backend::DriverBase::destroyInstance();
1127
1128 // OpenGL view
1129 if (_renderView)
1130 {
1131 _renderView->end();
1132 _renderView = nullptr;
1133 }
1134
1135#if AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID
1136 utils::killCurrentProcess();
1137#endif
1138}
1139
1140void Director::restartDirector()
1141{

Callers

nothing calls this directly

Calls 3

killCurrentProcessFunction · 0.85
resetFunction · 0.50
endMethod · 0.45

Tested by

no test coverage detected