summaryrefslogtreecommitdiff
path: root/src/filters.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-21 04:12:10 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-21 04:12:10 -0400
commit6548da04cdde83998ec380a1b47117b45b0d65f8 (patch)
tree7f022ce0139cce4a98f69dd96da4ef70272e5c7d /src/filters.h
parentaeea1cb3e1c5c158294e1f08543065c2e602c94e (diff)
downloadledger-6548da04cdde83998ec380a1b47117b45b0d65f8.tar.gz
ledger-6548da04cdde83998ec380a1b47117b45b0d65f8.tar.bz2
ledger-6548da04cdde83998ec380a1b47117b45b0d65f8.zip
Fixed another memory bug in by_payee_xacts
Diffstat (limited to 'src/filters.h')
-rw-r--r--src/filters.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/filters.h b/src/filters.h
index ea6874f6..112ebbcd 100644
--- a/src/filters.h
+++ b/src/filters.h
@@ -651,8 +651,8 @@ public:
*/
class by_payee_xacts : public item_handler<xact_t>
{
- typedef std::map<string, subtotal_xacts *> payee_subtotals_map;
- typedef std::pair<string, subtotal_xacts *> payee_subtotals_pair;
+ typedef std::map<string, shared_ptr<subtotal_xacts> > payee_subtotals_map;
+ typedef std::pair<string, shared_ptr<subtotal_xacts> > payee_subtotals_pair;
expr_t& amount_expr;
payee_subtotals_map payee_subtotals;
@@ -664,7 +664,9 @@ class by_payee_xacts : public item_handler<xact_t>
: item_handler<xact_t>(handler), amount_expr(_amount_expr) {
TRACE_CTOR(by_payee_xacts, "xact_handler_ptr, expr_t&");
}
- virtual ~by_payee_xacts();
+ virtual ~by_payee_xacts() {
+ TRACE_DTOR(by_payee_xacts);
+ }
virtual void flush();
virtual void operator()(xact_t& xact);
@@ -755,7 +757,7 @@ protected:
public:
generate_xacts(xact_handler_ptr handler)
: item_handler<xact_t>(handler) {
- TRACE_CTOR(dow_xacts, "xact_handler_ptr");
+ TRACE_CTOR(generate_xacts, "xact_handler_ptr");
}
virtual ~generate_xacts() {