diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-23 07:23:33 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-23 07:23:33 -0400 |
commit | b85a536be720c5beeff07bd9314a1fa8c1870dab (patch) | |
tree | 679a8309e6d1fc8e2bdda9d5170d3195a9f1ad38 /ledger.cc | |
parent | 1091f0d07b8fae388202a449239e8de321545a2a (diff) | |
download | fork-ledger-b85a536be720c5beeff07bd9314a1fa8c1870dab.tar.gz fork-ledger-b85a536be720c5beeff07bd9314a1fa8c1870dab.tar.bz2 fork-ledger-b85a536be720c5beeff07bd9314a1fa8c1870dab.zip |
change to binary loading that increases speed by another 20%
Diffstat (limited to 'ledger.cc')
-rw-r--r-- | ledger.cc | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -8,6 +8,8 @@ namespace ledger { const std::string version = "2.0b"; +#ifdef DO_CLEANUP + journal_t::~journal_t() { DEBUG_PRINT("ledger.memory.dtors", "dtor journal_t"); @@ -20,9 +22,16 @@ journal_t::~journal_t() for (entries_list::iterator i = entries.begin(); i != entries.end(); i++) - delete *i; + if (! item_pool || + ((char *) *i) < item_pool || ((char *) *i) >= item_pool_end) + delete *i; + + if (item_pool) + delete[] item_pool; } +#endif // DO_CLEANUP + bool journal_t::add_entry(entry_t * entry) { entries.push_back(entry); |