mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-02 12:00:01 -06:00
Fix some memory leaks
Free some objects that were allocated with new but not deleted, and in one case, do not set a pointer to nullptr before deleting, as this results in a memory leak due to memory allocated not being freed.
This commit is contained in:
@ -832,6 +832,7 @@ ScreenHandler::ScreenHandler(QWidget* widget)
|
||||
ScreenHandler::~ScreenHandler()
|
||||
{
|
||||
mouseTimer->stop();
|
||||
delete mouseTimer;
|
||||
}
|
||||
|
||||
void ScreenHandler::screenSetupLayout(int w, int h)
|
||||
@ -1872,6 +1873,8 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete[] actScreenAspectTop;
|
||||
delete[] actScreenAspectBot;
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent* event)
|
||||
@ -3376,6 +3379,8 @@ int main(int argc, char** argv)
|
||||
|
||||
int ret = melon.exec();
|
||||
|
||||
delete options;
|
||||
|
||||
emuThread->emuStop();
|
||||
emuThread->wait();
|
||||
delete emuThread;
|
||||
|
Reference in New Issue
Block a user