gnucash stable: [Account.cpp] explicitly destroy priv->splits
Christopher Lam
clam at code.gnucash.org
Fri Apr 19 22:09:22 EDT 2024
Updated via https://github.com/Gnucash/gnucash/commit/871f669a (commit)
from https://github.com/Gnucash/gnucash/commit/53c6bc6d (commit)
commit 871f669a1910947003bed67d32cbc60e1e2d80ea
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Apr 20 10:01:30 2024 +0800
[Account.cpp] explicitly destroy priv->splits
better than 35b6fb767d
diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp
index 9748f599b0..6625c1900c 100644
--- a/libgnucash/engine/Account.cpp
+++ b/libgnucash/engine/Account.cpp
@@ -1436,11 +1436,10 @@ xaccFreeAccount (Account *acc)
priv->type = ACCT_TYPE_NONE;
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;
+ priv->splits.~SplitsVec();
/* qof_instance_release (&acc->inst); */
g_object_unref(acc);
Summary of changes:
libgnucash/engine/Account.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
More information about the gnucash-changes
mailing list