From 7508f10f647f27f0a18e5671910de0f75d11d608 Mon Sep 17 00:00:00 2001 From: "james.k.crook@gmail.com" Date: Fri, 24 Oct 2014 16:52:17 +0000 Subject: [PATCH] Fixed some memory leaks. --- src/AudacityApp.cpp | 3 --- src/AudacityApp.h | 2 -- src/AudacityLogger.cpp | 1 + src/LyricsWindow.cpp | 1 + src/MixerBoard.cpp | 1 + src/Project.cpp | 1 + 6 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 01a49755c..3f33bcb9e 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -1477,9 +1477,6 @@ void AudacityApp::FinishInits() ModuleManager::Dispatch(AppInitialized); mWindowRectAlreadySaved = FALSE; - - mTimer = new wxTimer(this, kAudacityAppTimerID); - mTimer->Start(200); } void AudacityApp::InitCommandHandler() diff --git a/src/AudacityApp.h b/src/AudacityApp.h index 2c0457222..d1390fe4b 100644 --- a/src/AudacityApp.h +++ b/src/AudacityApp.h @@ -210,8 +210,6 @@ class AudacityApp:public wxApp { wxSingleInstanceChecker *mChecker; - wxTimer *mTimer; - bool m_aliasMissingWarningShouldShow; BlockFile *m_LastMissingBlockFile; diff --git a/src/AudacityLogger.cpp b/src/AudacityLogger.cpp index 69cd7cbe5..08eebe677 100644 --- a/src/AudacityLogger.cpp +++ b/src/AudacityLogger.cpp @@ -179,6 +179,7 @@ void AudacityLogger::Show(bool show) ic.CopyFromBitmap(theTheme.Bitmap(bmpAudacityLogo48x48)); #endif frame->SetIcon(*ic); + delete ic; #endif // Log text diff --git a/src/LyricsWindow.cpp b/src/LyricsWindow.cpp index 74a7f40df..672491538 100644 --- a/src/LyricsWindow.cpp +++ b/src/LyricsWindow.cpp @@ -74,6 +74,7 @@ LyricsWindow::LyricsWindow(AudacityProject *parent): ic = new wxIcon(wxICON(AudacityLogo48x48)); #endif SetIcon(*ic); + delete ic; #endif wxPoint panelPos(0, 0); diff --git a/src/MixerBoard.cpp b/src/MixerBoard.cpp index 02fc0a807..70e012b74 100644 --- a/src/MixerBoard.cpp +++ b/src/MixerBoard.cpp @@ -1736,6 +1736,7 @@ MixerBoardFrame::MixerBoardFrame(AudacityProject* parent) ic = new wxIcon(wxICON(AudacityLogo48x48)); #endif SetIcon(*ic); + delete ic; #endif } diff --git a/src/Project.cpp b/src/Project.cpp index 8ed96ebb6..1196bb9f5 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -998,6 +998,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id, ic.CopyFromBitmap(theTheme.Bitmap(bmpAudacityLogo48x48)); #endif SetIcon(*ic); + delete ic; #endif mIconized = false;