gnucash stable: [Account.cpp] ensure priv->splits releases memory on shutdown
Christopher Lam
clam at code.gnucash.org
Fri Apr 19 06:55:53 EDT 2024
Updated via https://github.com/Gnucash/gnucash/commit/35b6fb76 (commit)
from https://github.com/Gnucash/gnucash/commit/ae8e50e4 (commit)
commit 35b6fb767d0ff594728d4f7fe97e60186de3da63
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Fri Apr 19 18:55:05 2024 +0800
[Account.cpp] ensure priv->splits releases memory on shutdown
diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp
index f25f7c4feb..9748f599b0 100644
--- a/libgnucash/engine/Account.cpp
+++ b/libgnucash/engine/Account.cpp
@@ -1437,6 +1437,7 @@ xaccFreeAccount (Account *acc)
gnc_commodity_decrement_usage_count(priv->commodity);
priv->commodity = nullptr;
priv->splits.clear();
+ priv->splits.shrink_to_fit();
priv->balance_dirty = FALSE;
priv->sort_dirty = FALSE;
Summary of changes:
libgnucash/engine/Account.cpp | 1 +
1 file changed, 1 insertion(+)
More information about the gnucash-changes
mailing list