diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index 3b17ab1..838dd9a 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -166,7 +166,7 @@
       // going out of this strategy's namespace
       return;
     }
-    this->getMeasurements().extendLifetime(*measurementsEntry, MEASUREMENTS_LIFETIME);
+    this->getMeasurements().extendLifetime(measurementsEntry, MEASUREMENTS_LIFETIME);
 
     shared_ptr<MeasurementsEntryInfo> measurementsEntryInfo =
       this->getMeasurementsEntryInfo(measurementsEntry);
@@ -187,7 +187,7 @@
       // going out of this strategy's namespace
       return;
     }
-    this->getMeasurements().extendLifetime(*measurementsEntry, MEASUREMENTS_LIFETIME);
+    this->getMeasurements().extendLifetime(measurementsEntry, MEASUREMENTS_LIFETIME);
 
     shared_ptr<MeasurementsEntryInfo> measurementsEntryInfo =
       this->getMeasurementsEntryInfo(measurementsEntry);
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index 516de57..3672b66 100644
--- a/daemon/table/fib.cpp
+++ b/daemon/table/fib.cpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "fib.hpp"
 #include "pit-entry.hpp"
@@ -114,24 +115,28 @@
 }
 
 void
+Fib::erase(shared_ptr<name_tree::Entry> nameTreeEntry)
+{
+  nameTreeEntry->setFibEntry(shared_ptr<fib::Entry>());
+  m_nameTree.eraseEntryIfEmpty(nameTreeEntry);
+  --m_nItems;
+}
+
+void
 Fib::erase(const Name& prefix)
 {
   shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.findExactMatch(prefix);
-  if (static_cast<bool>(nameTreeEntry))
-  {
-    nameTreeEntry->setFibEntry(shared_ptr<fib::Entry>());
-    --m_nItems;
+  if (static_cast<bool>(nameTreeEntry)) {
+    this->erase(nameTreeEntry);
   }
 }
 
 void
 Fib::erase(const fib::Entry& entry)
 {
-  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.findExactMatch(entry);
-  if (static_cast<bool>(nameTreeEntry))
-  {
-    nameTreeEntry->setFibEntry(shared_ptr<fib::Entry>());
-    --m_nItems;
+  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.get(entry);
+  if (static_cast<bool>(nameTreeEntry)) {
+    this->erase(nameTreeEntry);
   }
 }
 
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index e5aaf15..615462f 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_TABLE_FIB_HPP
 #define NFD_DAEMON_TABLE_FIB_HPP
@@ -128,6 +129,9 @@
   shared_ptr<fib::Entry>
   findLongestPrefixMatch(shared_ptr<name_tree::Entry> nameTreeEntry) const;
 
+  void
+  erase(shared_ptr<name_tree::Entry> nameTreeEntry);
+
 private:
   NameTree& m_nameTree;
   size_t m_nItems;
diff --git a/daemon/table/measurements-accessor.cpp b/daemon/table/measurements-accessor.cpp
index 8ecb0fd..81b1432 100644
--- a/daemon/table/measurements-accessor.cpp
+++ b/daemon/table/measurements-accessor.cpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "measurements-accessor.hpp"
 
diff --git a/daemon/table/measurements-accessor.hpp b/daemon/table/measurements-accessor.hpp
index 2db0ccb..2108435 100644
--- a/daemon/table/measurements-accessor.hpp
+++ b/daemon/table/measurements-accessor.hpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP
 #define NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP
@@ -68,7 +69,7 @@
    *  The entry will be kept until at least now()+lifetime.
    */
   void
-  extendLifetime(measurements::Entry& entry, const time::nanoseconds& lifetime);
+  extendLifetime(shared_ptr<measurements::Entry> entry, const time::nanoseconds& lifetime);
 
 private:
   /** \brief perform access control to Measurements entry
@@ -109,7 +110,8 @@
 }
 
 inline void
-MeasurementsAccessor::extendLifetime(measurements::Entry& entry, const time::nanoseconds& lifetime)
+MeasurementsAccessor::extendLifetime(shared_ptr<measurements::Entry> entry,
+                                     const time::nanoseconds& lifetime)
 {
   m_measurements.extendLifetime(entry, lifetime);
 }
diff --git a/daemon/table/measurements.cpp b/daemon/table/measurements.cpp
index a63c602..4943bf4 100644
--- a/daemon/table/measurements.cpp
+++ b/daemon/table/measurements.cpp
@@ -100,7 +100,15 @@
     return shared_ptr<measurements::Entry>();
   }
 
-  return this->get(child->getName().getPrefix(-1));
+  shared_ptr<name_tree::Entry> nameTreeChild = m_nameTree.get(*child);
+  shared_ptr<name_tree::Entry> nameTreeEntry = nameTreeChild->getParent();
+  if (static_cast<bool>(nameTreeEntry)) {
+    return this->get(nameTreeEntry);
+  }
+  else {
+    BOOST_ASSERT(nameTreeChild->getPrefix().size() == 0); // root entry has no parent
+    return shared_ptr<measurements::Entry>();
+  }
 }
 
 shared_ptr<measurements::Entry>
@@ -124,33 +132,38 @@
 }
 
 void
-Measurements::extendLifetime(measurements::Entry& entry, const time::nanoseconds& lifetime)
+Measurements::extendLifetime(shared_ptr<measurements::Entry> entry,
+                             const time::nanoseconds& lifetime)
 {
-  shared_ptr<measurements::Entry> ret = this->findExactMatch(entry.getName());
-  if (static_cast<bool>(ret))
-  {
-    time::steady_clock::TimePoint expiry = time::steady_clock::now() + lifetime;
-    if (ret->m_expiry >= expiry) // has longer lifetime, not extending
-      return;
-    scheduler::cancel(entry.m_cleanup);
-    entry.m_expiry = expiry;
-    entry.m_cleanup = scheduler::schedule(lifetime,
-                         bind(&Measurements::cleanup, this, ret));
+  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.get(*entry);
+  if (!static_cast<bool>(nameTreeEntry) ||
+      nameTreeEntry->getMeasurementsEntry().get() != entry.get()) {
+    // entry is already gone; it is a dangling reference
+    return;
   }
+
+  time::steady_clock::TimePoint expiry = time::steady_clock::now() + lifetime;
+  if (entry->m_expiry >= expiry) {
+    // has longer lifetime, not extending
+    return;
+  }
+
+  scheduler::cancel(entry->m_cleanup);
+  entry->m_expiry = expiry;
+  entry->m_cleanup = scheduler::schedule(lifetime, bind(&Measurements::cleanup, this, entry));
 }
 
 void
 Measurements::cleanup(shared_ptr<measurements::Entry> entry)
 {
-  BOOST_ASSERT(entry);
+  BOOST_ASSERT(static_cast<bool>(entry));
 
-  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.findExactMatch(entry->getName());
-  if (static_cast<bool>(nameTreeEntry))
-  {
+  shared_ptr<name_tree::Entry> nameTreeEntry = m_nameTree.get(*entry);
+  if (static_cast<bool>(nameTreeEntry)) {
     nameTreeEntry->setMeasurementsEntry(shared_ptr<measurements::Entry>());
+    m_nameTree.eraseEntryIfEmpty(nameTreeEntry);
     m_nItems--;
   }
-
 }
 
 } // namespace nfd
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index 1ace0b9..7478c58 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.hpp
@@ -86,7 +86,7 @@
    *  The entry will be kept until at least now()+lifetime.
    */
   void
-  extendLifetime(measurements::Entry& entry, const time::nanoseconds& lifetime);
+  extendLifetime(shared_ptr<measurements::Entry> entry, const time::nanoseconds& lifetime);
 
   size_t
   size() const;
diff --git a/daemon/table/name-tree-entry.cpp b/daemon/table/name-tree-entry.cpp
index 0e4d821..017dbfe 100644
--- a/daemon/table/name-tree-entry.cpp
+++ b/daemon/table/name-tree-entry.cpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,9 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-// Name Tree Entry (i.e., Name Prefix Entry)
+ */
 
 #include "name-tree-entry.hpp"
 
@@ -41,7 +40,7 @@
   // resolve hash collisions
   // So before erasing a single node, make sure its m_next == 0
   // See eraseEntryIfEmpty in name-tree.cpp
-  if (m_next)
+  if (m_next != 0)
     delete m_next;
 }
 
@@ -55,6 +54,42 @@
 {
 }
 
+bool
+Entry::isEmpty() const
+{
+  return m_children.empty() &&
+         !static_cast<bool>(m_fibEntry) &&
+         m_pitEntries.empty() &&
+         !static_cast<bool>(m_measurementsEntry) &&
+         !static_cast<bool>(m_strategyChoiceEntry);
+}
+
+void
+Entry::setFibEntry(shared_ptr<fib::Entry> fibEntry)
+{
+  if (static_cast<bool>(fibEntry)) {
+    BOOST_ASSERT(!static_cast<bool>(fibEntry->m_nameTreeEntry));
+  }
+
+  if (static_cast<bool>(m_fibEntry)) {
+    m_fibEntry->m_nameTreeEntry.reset();
+  }
+  m_fibEntry = fibEntry;
+  if (static_cast<bool>(m_fibEntry)) {
+    m_fibEntry->m_nameTreeEntry = this->shared_from_this();
+  }
+}
+
+void
+Entry::insertPitEntry(shared_ptr<pit::Entry> pitEntry)
+{
+  BOOST_ASSERT(static_cast<bool>(pitEntry));
+  BOOST_ASSERT(!static_cast<bool>(pitEntry->m_nameTreeEntry));
+
+  m_pitEntries.push_back(pitEntry);
+  pitEntry->m_nameTreeEntry = this->shared_from_this();
+}
+
 void
 Entry::erasePitEntry(shared_ptr<pit::Entry> pitEntry)
 {
@@ -70,5 +105,37 @@
   pitEntry->m_nameTreeEntry.reset();
 }
 
+void
+Entry::setMeasurementsEntry(shared_ptr<measurements::Entry> measurementsEntry)
+{
+  if (static_cast<bool>(measurementsEntry)) {
+    BOOST_ASSERT(!static_cast<bool>(measurementsEntry->m_nameTreeEntry));
+  }
+
+  if (static_cast<bool>(m_measurementsEntry)) {
+    m_measurementsEntry->m_nameTreeEntry.reset();
+  }
+  m_measurementsEntry = measurementsEntry;
+  if (static_cast<bool>(m_measurementsEntry)) {
+    m_measurementsEntry->m_nameTreeEntry = this->shared_from_this();
+  }
+}
+
+void
+Entry::setStrategyChoiceEntry(shared_ptr<strategy_choice::Entry> strategyChoiceEntry)
+{
+  if (static_cast<bool>(strategyChoiceEntry)) {
+    BOOST_ASSERT(!static_cast<bool>(strategyChoiceEntry->m_nameTreeEntry));
+  }
+
+  if (static_cast<bool>(m_strategyChoiceEntry)) {
+    m_strategyChoiceEntry->m_nameTreeEntry.reset();
+  }
+  m_strategyChoiceEntry = strategyChoiceEntry;
+  if (static_cast<bool>(m_strategyChoiceEntry)) {
+    m_strategyChoiceEntry->m_nameTreeEntry = this->shared_from_this();
+  }
+}
+
 } // namespace name_tree
 } // namespace nfd
diff --git a/daemon/table/name-tree-entry.hpp b/daemon/table/name-tree-entry.hpp
index 48c9af7..d0e3587 100644
--- a/daemon/table/name-tree-entry.hpp
+++ b/daemon/table/name-tree-entry.hpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,9 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-// Name Tree Entry (i.e., Name Prefix Entry)
+ */
 
 #ifndef NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP
 #define NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP
@@ -95,6 +94,7 @@
   bool
   isEmpty() const;
 
+public: // attached table entries
   void
   setFibEntry(shared_ptr<fib::Entry> fibEntry);
 
@@ -187,37 +187,12 @@
   return !m_children.empty();
 }
 
-inline bool
-Entry::isEmpty() const
-{
-  return m_children.empty() &&
-         !static_cast<bool>(m_fibEntry) &&
-         m_pitEntries.empty() &&
-         !static_cast<bool>(m_measurementsEntry);
-}
-
 inline shared_ptr<fib::Entry>
 Entry::getFibEntry() const
 {
   return m_fibEntry;
 }
 
-inline void
-Entry::setFibEntry(shared_ptr<fib::Entry> fibEntry)
-{
-  if (static_cast<bool>(fibEntry)) {
-    BOOST_ASSERT(!static_cast<bool>(fibEntry->m_nameTreeEntry));
-  }
-
-  if (static_cast<bool>(m_fibEntry)) {
-    m_fibEntry->m_nameTreeEntry.reset();
-  }
-  m_fibEntry = fibEntry;
-  if (static_cast<bool>(m_fibEntry)) {
-    m_fibEntry->m_nameTreeEntry = this->shared_from_this();
-  }
-}
-
 inline bool
 Entry::hasPitEntries() const
 {
@@ -230,60 +205,18 @@
   return m_pitEntries;
 }
 
-inline void
-Entry::insertPitEntry(shared_ptr<pit::Entry> pitEntry)
-{
-  BOOST_ASSERT(static_cast<bool>(pitEntry));
-  BOOST_ASSERT(!static_cast<bool>(pitEntry->m_nameTreeEntry));
-
-  m_pitEntries.push_back(pitEntry);
-  pitEntry->m_nameTreeEntry = this->shared_from_this();
-}
-
 inline shared_ptr<measurements::Entry>
 Entry::getMeasurementsEntry() const
 {
   return m_measurementsEntry;
 }
 
-inline void
-Entry::setMeasurementsEntry(shared_ptr<measurements::Entry> measurementsEntry)
-{
-  if (static_cast<bool>(measurementsEntry)) {
-    BOOST_ASSERT(!static_cast<bool>(measurementsEntry->m_nameTreeEntry));
-  }
-
-  if (static_cast<bool>(m_measurementsEntry)) {
-    m_measurementsEntry->m_nameTreeEntry.reset();
-  }
-  m_measurementsEntry = measurementsEntry;
-  if (static_cast<bool>(m_measurementsEntry)) {
-    m_measurementsEntry->m_nameTreeEntry = this->shared_from_this();
-  }
-}
-
 inline shared_ptr<strategy_choice::Entry>
 Entry::getStrategyChoiceEntry() const
 {
   return m_strategyChoiceEntry;
 }
 
-inline void
-Entry::setStrategyChoiceEntry(shared_ptr<strategy_choice::Entry> strategyChoiceEntry)
-{
-  if (static_cast<bool>(strategyChoiceEntry)) {
-    BOOST_ASSERT(!static_cast<bool>(strategyChoiceEntry->m_nameTreeEntry));
-  }
-
-  if (static_cast<bool>(m_strategyChoiceEntry)) {
-    m_strategyChoiceEntry->m_nameTreeEntry.reset();
-  }
-  m_strategyChoiceEntry = strategyChoiceEntry;
-  if (static_cast<bool>(m_strategyChoiceEntry)) {
-    m_strategyChoiceEntry->m_nameTreeEntry = this->shared_from_this();
-  }
-}
-
 } // namespace name_tree
 } // namespace nfd
 
diff --git a/daemon/table/name-tree.hpp b/daemon/table/name-tree.hpp
index 2f404bf..027f852 100644
--- a/daemon/table/name-tree.hpp
+++ b/daemon/table/name-tree.hpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,9 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
-
-// Name Tree (Name Prefix Hash Table)
+ */
 
 #ifndef NFD_DAEMON_TABLE_NAME_TREE_HPP
 #define NFD_DAEMON_TABLE_NAME_TREE_HPP
@@ -121,17 +120,12 @@
   shared_ptr<name_tree::Entry>
   findExactMatch(const Name& prefix) const;
 
-  shared_ptr<name_tree::Entry>
-  findExactMatch(const fib::Entry& fibEntry) const;
-
   /**
-   * \brief Erase a Name Tree Entry if this entry is empty.
-   * \details If a Name Tree Entry contains no Children, no FIB, no PIT, and
-   * no Measurements entries, then it can be erased. In addition, its parent entry
-   * will also be examined by following the parent pointer until all empty entries
-   * are erased.
-   * \param entry The pointer to the entry to be erased. The entry pointer should
-   * returned by the findExactMatch(), lookup(), or findLongestPrefixMatch() functions.
+   * \brief Delete a Name Tree Entry if this entry is empty.
+   * \param entry The entry to be deleted if empty.
+   * \note This function must be called after a table entry is detached from Name Tree
+   *       entry. The function deletes a Name Tree entry if nothing is attached to it and
+   *       it has no children, then repeats the same process on its ancestors.
    */
   bool
   eraseEntryIfEmpty(shared_ptr<name_tree::Entry> entry);
@@ -297,12 +291,6 @@
 }
 
 inline shared_ptr<name_tree::Entry>
-NameTree::findExactMatch(const fib::Entry& fibEntry) const
-{
-  return fibEntry.m_nameTreeEntry;
-}
-
-inline shared_ptr<name_tree::Entry>
 NameTree::get(const fib::Entry& fibEntry) const
 {
   return fibEntry.m_nameTreeEntry;
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index 34c583e..aa5db1b 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "strategy-choice.hpp"
 #include "core/logger.hpp"
@@ -120,6 +120,7 @@
   this->changeStrategy(entry, oldStrategy.shared_from_this(), parentStrategy.shared_from_this());
 
   nameTreeEntry->setStrategyChoiceEntry(shared_ptr<Entry>());
+  m_nameTree.eraseEntryIfEmpty(nameTreeEntry);
   --m_nItems;
 }
 
