1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Bug2531 mitigation: Reduce the pause without progress dialog...

... Do so by lowering the usage of TransactionScope into UndoManager, so that
deletion of blocks is more often grouped into a transaction, as when invoking
Compact via the menu item.
This commit is contained in:
Paul Licameli
2020-09-05 15:16:57 -04:00
parent e4319144c8
commit 49fc197e42
2 changed files with 9 additions and 5 deletions

View File

@@ -15,7 +15,6 @@ Paul Licameli split from AudacityProject.cpp
#include "AdornedRulerPanel.h"
#include "AudioIO.h"
#include "Clipboard.h"
#include "DBConnection.h"
#include "FileNames.h"
#include "Menus.h"
#include "ModuleManager.h"
@@ -741,16 +740,12 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event)
projectFileIO.SetBypass();
{
TransactionScope trans(projectFileIO.GetConnection(), "Shutdown");
// 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
tracks.Clear();
trans.Commit();
}
// We're all done with the project file, so close it now