stasis-bLSM/memTreeComponent.cpp
surajach 5524b96bd9 Removing the typename keyword to make declarations compile with gcc 4.1.2 after a bunch of types are no longer templates
git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@2672 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
2011-06-13 18:47:21 +00:00

23 lines
512 B
C++

#include "memTreeComponent.h"
#include "datatuple.h"
void memTreeComponent::tearDownTree(rbtree_ptr_t tree) {
datatuple * t = 0;
rbtree_t::iterator old;
for(rbtree_t::iterator delitr = tree->begin();
delitr != tree->end();
delitr++) {
if(t) {
tree->erase(old);
datatuple::freetuple(t);
t = 0;
}
t = *delitr;
old = delitr;
}
if(t) {
tree->erase(old);
datatuple::freetuple(t);
}
delete tree;
}