From e2afc783db0dff1927b00dc506390353d9e3bbd2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 29 Feb 2012 22:32:23 -0600 Subject: Increased file copyrights to 2012 --- src/chain.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chain.h') diff --git a/src/chain.h b/src/chain.h index 7bd76712..080c4231 100644 --- a/src/chain.h +++ b/src/chain.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2010, John Wiegley. All rights reserved. + * Copyright (c) 2003-2012, John Wiegley. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are -- cgit v1.2.3 From fcc68a0041d0c1334127a880e74b3a4646292cf6 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 11 Mar 2012 05:09:06 -0500 Subject: Critical fix to temporary destruction order --- src/chain.h | 3 ++- src/filters.h | 8 ++++++++ src/iterators.h | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/chain.h') 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 -struct item_handler : public noncopyable +class item_handler : public noncopyable { +protected: shared_ptr 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 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() {} -- cgit v1.2.3