diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-10 01:41:59 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-10 01:41:59 -0400 |
commit | ba02f0a45036a1f9c64cd56533990d3284bcc4cf (patch) | |
tree | f261e8d3cadb5d3dccd904b7c8c7fe5e90811aa3 /src/xact.h | |
parent | c9d575abceb672d1c23383d973adee40daeecda8 (diff) | |
download | fork-ledger-ba02f0a45036a1f9c64cd56533990d3284bcc4cf.tar.gz fork-ledger-ba02f0a45036a1f9c64cd56533990d3284bcc4cf.tar.bz2 fork-ledger-ba02f0a45036a1f9c64cd56533990d3284bcc4cf.zip |
Fixed a memory leak that would show up if --verify --verbose was running and
an error or exception occurred.
Diffstat (limited to 'src/xact.h')
-rw-r--r-- | src/xact.h | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -155,10 +155,22 @@ public: optional<xacts_list> component_xacts; xdata_t() : supports_flags<>(), index(0), account(NULL), ptr(NULL) { - TRACE_CTOR(xdata_t, ""); + TRACE_CTOR(xact_t::xdata_t, ""); + } + xdata_t(const xdata_t& other) + : supports_flags<>(other.flags()), + total(other.total), + sort_value(other.sort_value), + value(other.value), + index(other.index), + date(other.date), + account(other.account), + ptr(NULL) + { + TRACE_CTOR(xact_t::xdata_t, "copy"); } ~xdata_t() throw() { - TRACE_DTOR(xdata_t); + TRACE_DTOR(xact_t::xdata_t); } void remember_xact(xact_t& xact) { |