diff options
-rw-r--r-- | src/chain.h | 3 | ||||
-rw-r--r-- | src/filters.h | 8 | ||||
-rw-r--r-- | src/iterators.h | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/chain.h b/src/chain.h index 080c4231..15ae12ba 100644 --- a/src/chain.h +++ b/src/chain.h @@ -50,8 +50,9 @@ class post_t; class account_t; template <typename T> -struct item_handler : public noncopyable +class item_handler : public noncopyable { +protected: shared_ptr<item_handler> handler; public: diff --git a/src/filters.h b/src/filters.h index 7be3acb9..af68cd7c 100644 --- a/src/filters.h +++ b/src/filters.h @@ -372,6 +372,7 @@ public: } virtual ~anonymize_posts() { TRACE_DTOR(anonymize_posts); + handler.reset(); } void render_commodity(amount_t& amt); @@ -451,6 +452,7 @@ public: } virtual ~collapse_posts() { TRACE_DTOR(collapse_posts); + handler.reset(); } void create_accounts() { @@ -539,6 +541,7 @@ public: virtual ~display_filter_posts() { TRACE_DTOR(display_filter_posts); + handler.reset(); } void create_accounts() { @@ -595,6 +598,7 @@ public: virtual ~changed_value_posts() { TRACE_DTOR(changed_value_posts); + handler.reset(); } void create_accounts() { @@ -671,6 +675,7 @@ public: } virtual ~subtotal_posts() { TRACE_DTOR(subtotal_posts); + handler.reset(); } void report_subtotal(const char * spec_fmt = NULL, @@ -849,6 +854,7 @@ public: } virtual ~transfer_details() { TRACE_DTOR(transfer_details); + handler.reset(); } virtual void operator()(post_t& post); @@ -908,6 +914,7 @@ public: virtual ~generate_posts() { TRACE_DTOR(generate_posts); + handler.reset(); } void add_period_xacts(period_xacts_list& period_xacts); @@ -995,6 +1002,7 @@ class inject_posts : public item_handler<post_t> virtual ~inject_posts() throw() { TRACE_DTOR(inject_posts); + handler.reset(); } virtual void operator()(post_t& post); diff --git a/src/iterators.h b/src/iterators.h index 6d490259..5bb9de6f 100644 --- a/src/iterators.h +++ b/src/iterators.h @@ -169,8 +169,8 @@ protected: journal_posts_iterator journal_posts; xacts_iterator xacts; xact_posts_iterator posts; - temporaries_t temps; xacts_list xact_temps; + temporaries_t temps; public: posts_commodities_iterator() {} |