MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / ~Framework

Method ~Framework

framework/framework.cpp:261–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261Framework::~Framework()
262{
263 LogInfo("Destroying framework");
264 // Stop any audio first, as if you've got ongoing music/samples it could call back into the
265 // framework for the threadpool/data read/all kinda of stuff it shouldn't do on a
266 // half-destroyed framework
267 audioShutdown();
268 LogInfo("Stopping threadpool");
269 p->threadPool.reset();
270 LogInfo("Clearing stages");
271 p->ProgramStages.clear();
272 LogInfo("Saving config");
273 if (config().getBool("Config.Save"))
274 config().save();
275
276 LogInfo("Shutdown");
277 // Make sure we destroy the data implementation before the renderer to ensure any possibly
278 // cached images are already destroyed
279 this->data.reset();
280 if (createWindow)
281 {
282 displayShutdown();
283 }
284 LogInfo("SDL shutdown");
285 PHYSFS_deinit();
286 SDL_Quit();
287 instance = nullptr;
288}
289
290Framework &Framework::getInstance()
291{

Callers

nothing calls this directly

Calls 4

getBoolMethod · 0.80
resetMethod · 0.45
clearMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected