From 061208c5cfac840e7930ff7c48481870ea1749c3 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 20 Jul 2020 19:03:40 -0400 Subject: [PATCH] Remove obsolete mentions of DirManager in comments --- src/AudacityApp.cpp | 1 - src/ProjectManager.cpp | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index c143f9068..b519eb30e 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -1263,7 +1263,6 @@ bool AudacityApp::OnInit() // AColor depends on theTheme. AColor::Init(); - // Init DirManager, which initializes the temp directory // If this fails, we must exit the program. if (!InitTempDir()) { FinishPreferences(); diff --git a/src/ProjectManager.cpp b/src/ProjectManager.cpp index ca2f5526b..9f8fbaf4d 100644 --- a/src/ProjectManager.cpp +++ b/src/ProjectManager.cpp @@ -706,7 +706,6 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event) #endif // DanH: If we're definitely about to quit, clear the clipboard. - // Doing this after Deref'ing the DirManager causes problems. auto &clipboard = Clipboard::Get(); if ((AllProjects{}.size() == 1) && (quitOnClose || AllProjects::Closing())) @@ -744,11 +743,11 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event) { AutoCommitTransaction trans(projectFileIO, "Shutdown"); - // This must be done before the following Deref() since it holds - // references to the DirManager. + // This can reduce reference counts of sample blocks in the project's + // tracks. UndoManager::Get( project ).ClearStates(); - // Delete all the tracks to free up memory and DirManager references. + // Delete all the tracks to free up memory tracks.Clear(); } @@ -922,7 +921,6 @@ void ProjectManager::ResetProjectToEmpty() { SelectUtilities::DoSelectAll( project ); TrackUtilities::DoRemoveTracks( project ); - // A new DirManager. TrackFactory::Reset( project ); projectFileManager.Reset();