| 1117 | } |
| 1118 | |
| 1119 | void 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 | |
| 1140 | void Director::restartDirector() |
| 1141 | { |
nothing calls this directly
no test coverage detected