fixed several memory leaks caused by not including virtual destructors, added a config for the visualizer, next up is lua
This commit is contained in:
@@ -55,6 +55,10 @@ void SdlRenderer::draw_text(std::optional<TextRenderDetails> details, std::strin
|
||||
}
|
||||
|
||||
SdlRenderer::~SdlRenderer() {
|
||||
// clear resource managers pointing to shared pointers
|
||||
// This avoids an invalid read, since otherwise TTF_Quit will cleanup fonts and then clearing the shared pointers will try it again
|
||||
font_manager->clear_all_resources();
|
||||
texture_manager->clear_all_resources();
|
||||
// exit subsystems
|
||||
IMG_Quit();
|
||||
TTF_Quit();
|
||||
|
||||
Reference in New Issue
Block a user