Esempio n. 1
0
 public void RemoveKey(string key)
 {
     if (m_root==null)
     {
         throw new BplusTreeKeyMissing("tree is empty: cannot delete");
     }
     bool mergeMe;
     var theroot = m_root;
     theroot.Delete(key, out mergeMe);
     // if the root is not a leaf and contains only one child (no key), reroot
     if (mergeMe && !m_root.IsLeaf && m_root.SizeInUse()==0)
     {
         m_root = m_root.FirstChild();
         m_rootSeek = m_root.MakeRoot();
         theroot.Free();
     }
 }