diff options
Diffstat (limited to 'ledger.cc')
-rw-r--r-- | ledger.cc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -68,6 +68,8 @@ bool entry_t::valid() const return true; } +void clean_commodity_history(char * item_pool, char * item_pool_end); + journal_t::~journal_t() { DEBUG_PRINT("ledger.memory.dtors", "dtor journal_t"); @@ -86,6 +88,9 @@ journal_t::~journal_t() else (*i)->~entry_t(); + // Remove historical prices which were allocated in the item_pool. + clean_commodity_history(item_pool, item_pool_end); + if (item_pool) delete[] item_pool; } |