From 871f669a1910947003bed67d32cbc60e1e2d80ea Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sat, 20 Apr 2024 10:01:30 +0800 Subject: [PATCH] [Account.cpp] explicitly destroy priv->splits better than 35b6fb767d --- libgnucash/engine/Account.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp index 9748f599b05..6625c1900c4 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);