int SweepTree::Remove(SweepTreeList &list, SweepEventQueue &queue, bool rebalance) { RemoveEvents(queue); AVLTree *tempR = static_cast<AVLTree *>(list.racine); int err = AVLTree::Remove(tempR, rebalance); list.racine = static_cast<SweepTree *>(tempR); MakeDelete(); if (list.nbTree <= 1) { list.nbTree = 0; list.racine = NULL; } else { if (list.racine == list.trees + (list.nbTree - 1)) list.racine = this; list.trees[--list.nbTree].Relocate(this); } return err; }
SweepTree::~SweepTree() { MakeDelete(); }
SweepEvent::~SweepEvent() { MakeDelete(); }
AVLTree::~AVLTree() { MakeDelete(); }