diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index bb41fba..9d4df0c 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -42,14 +42,9 @@
 {
 }
 
-AccessStrategy::~AccessStrategy()
-{
-}
-
 void
-AccessStrategy::afterReceiveInterest(const Face& inFace,
-                                     const Interest& interest,
-                                     shared_ptr<pit::Entry> pitEntry)
+AccessStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
+                                     const shared_ptr<pit::Entry>& pitEntry)
 {
   RetxSuppression::Result suppressResult = m_retxSuppression.decide(inFace, interest, *pitEntry);
   switch (suppressResult) {
@@ -69,9 +64,8 @@
 }
 
 void
-AccessStrategy::afterReceiveNewInterest(const Face& inFace,
-                                        const Interest& interest,
-                                        shared_ptr<pit::Entry> pitEntry)
+AccessStrategy::afterReceiveNewInterest(const Face& inFace, const Interest& interest,
+                                        const shared_ptr<pit::Entry>& pitEntry)
 {
   const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
   Name miName;
@@ -102,9 +96,8 @@
 }
 
 void
-AccessStrategy::afterReceiveRetxInterest(const Face& inFace,
-                                         const Interest& interest,
-                                         shared_ptr<pit::Entry> pitEntry)
+AccessStrategy::afterReceiveRetxInterest(const Face& inFace, const Interest& interest,
+                                         const shared_ptr<pit::Entry>& pitEntry)
 {
   const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
   NFD_LOG_DEBUG(interest << " interestFrom " << inFace.getId() << " retx-forward");
@@ -112,8 +105,8 @@
 }
 
 bool
-AccessStrategy::sendToLastNexthop(const Face& inFace, shared_ptr<pit::Entry> pitEntry, MtInfo& mi,
-                                  const fib::Entry& fibEntry)
+AccessStrategy::sendToLastNexthop(const Face& inFace, const shared_ptr<pit::Entry>& pitEntry,
+                                  MtInfo& mi, const fib::Entry& fibEntry)
 {
   if (mi.lastNexthop == face::INVALID_FACEID) {
     NFD_LOG_DEBUG(pitEntry->getInterest() << " no-last-nexthop");
@@ -152,8 +145,7 @@
 }
 
 void
-AccessStrategy::afterRtoTimeout(weak_ptr<pit::Entry> pitWeak,
-                                FaceId inFace, FaceId firstOutFace)
+AccessStrategy::afterRtoTimeout(weak_ptr<pit::Entry> pitWeak, FaceId inFace, FaceId firstOutFace)
 {
   shared_ptr<pit::Entry> pitEntry = pitWeak.lock();
   BOOST_ASSERT(pitEntry != nullptr);
@@ -167,7 +159,7 @@
 }
 
 void
-AccessStrategy::multicast(shared_ptr<pit::Entry> pitEntry, const fib::Entry& fibEntry,
+AccessStrategy::multicast(const shared_ptr<pit::Entry>& pitEntry, const fib::Entry& fibEntry,
                           std::unordered_set<FaceId> exceptFaces)
 {
   for (const fib::NextHop& nexthop : fibEntry.getNextHops()) {
@@ -182,7 +174,7 @@
 }
 
 void
-AccessStrategy::beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
+AccessStrategy::beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
                                       const Face& inFace, const Data& data)
 {
   shared_ptr<PitInfo> pi = pitEntry->getStrategyInfo<PitInfo>();
diff --git a/daemon/fw/access-strategy.hpp b/daemon/fw/access-strategy.hpp
index 02a7965..b71f2c6 100644
--- a/daemon/fw/access-strategy.hpp
+++ b/daemon/fw/access-strategy.hpp
@@ -49,19 +49,16 @@
 class AccessStrategy : public Strategy
 {
 public:
+  explicit
   AccessStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
 
-  virtual
-  ~AccessStrategy();
-
 public: // triggers
   virtual void
-  afterReceiveInterest(const Face& inFace,
-                       const Interest& interest,
-                       shared_ptr<pit::Entry> pitEntry) override;
+  afterReceiveInterest(const Face& inFace, const Interest& interest,
+                       const shared_ptr<pit::Entry>& pitEntry) override;
 
   virtual void
-  beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
+  beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
                         const Face& inFace, const Data& data) override;
 
 private: // StrategyInfo
@@ -127,20 +124,18 @@
 
 private: // forwarding procedures
   void
-  afterReceiveNewInterest(const Face& inFace,
-                          const Interest& interest,
-                          shared_ptr<pit::Entry> pitEntry);
+  afterReceiveNewInterest(const Face& inFace, const Interest& interest,
+                          const shared_ptr<pit::Entry>& pitEntry);
 
   void
-  afterReceiveRetxInterest(const Face& inFace,
-                           const Interest& interest,
-                           shared_ptr<pit::Entry> pitEntry);
+  afterReceiveRetxInterest(const Face& inFace, const Interest& interest,
+                           const shared_ptr<pit::Entry>& pitEntry);
 
   /** \brief send to last working nexthop
    *  \return whether an Interest is sent
    */
   bool
-  sendToLastNexthop(const Face& inFace, shared_ptr<pit::Entry> pitEntry, MtInfo& mi,
+  sendToLastNexthop(const Face& inFace, const shared_ptr<pit::Entry>& pitEntry, MtInfo& mi,
                     const fib::Entry& fibEntry);
 
   void
@@ -150,8 +145,7 @@
    *  \param exceptFaces don't forward to those faces
    */
   void
-  multicast(shared_ptr<pit::Entry> pitEntry,
-            const fib::Entry& fibEntry,
+  multicast(const shared_ptr<pit::Entry>& pitEntry, const fib::Entry& fibEntry,
             std::unordered_set<FaceId> exceptFaces = std::unordered_set<FaceId>());
 
   void
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index 11249f8..c15aca0 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.cpp
@@ -110,7 +110,7 @@
 }
 
 void
-FaceInfo::recordRtt(const shared_ptr<pit::Entry> pitEntry, const Face& inFace)
+FaceInfo::recordRtt(const shared_ptr<pit::Entry>& pitEntry, const Face& inFace)
 {
   // Calculate RTT
   pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(inFace);
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index 64f88c2..205219d 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.hpp
@@ -131,7 +131,7 @@
   }
 
   void
-  recordRtt(const shared_ptr<pit::Entry> pitEntry, const Face& inFace);
+  recordRtt(const shared_ptr<pit::Entry>& pitEntry, const Face& inFace);
 
   void
   recordTimeout(const ndn::Name& interestName);
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index 3f8abf7..9ed2c77 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -49,14 +49,9 @@
 {
 }
 
-AsfStrategy::~AsfStrategy()
-{
-}
-
 void
-AsfStrategy::afterReceiveInterest(const Face& inFace,
-                                  const Interest& interest,
-                                  shared_ptr<pit::Entry> pitEntry)
+AsfStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
+                                  const shared_ptr<pit::Entry>& pitEntry)
 {
   // Should the Interest be suppressed?
   RetxSuppression::Result suppressResult = m_retxSuppression.decide(inFace, interest, *pitEntry);
@@ -105,9 +100,8 @@
 }
 
 void
-AsfStrategy::beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
-                                   const Face& inFace,
-                                   const Data& data)
+AsfStrategy::beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
+                                   const Face& inFace, const Data& data)
 {
   shared_ptr<NamespaceInfo> namespaceInfo = m_measurements.getNamespaceInfo(pitEntry->getName());
 
@@ -130,7 +124,7 @@
 
 void
 AsfStrategy::afterReceiveNack(const Face& inFace, const lp::Nack& nack,
-                              shared_ptr<pit::Entry> pitEntry)
+                              const shared_ptr<pit::Entry>& pitEntry)
 {
   NFD_LOG_DEBUG("Nack for " << nack.getInterest() << " from=" << inFace.getId() << ": " << nack.getReason());
   onTimeout(pitEntry->getName(), inFace.getId());
@@ -142,7 +136,7 @@
 void
 AsfStrategy::forwardInterest(const Interest& interest,
                              const fib::Entry& fibEntry,
-                             shared_ptr<pit::Entry> pitEntry,
+                             const shared_ptr<pit::Entry>& pitEntry,
                              Face& outFace,
                              bool wantNewNonce)
 {
@@ -197,7 +191,8 @@
 }
 
 Face*
-AsfStrategy::getBestFaceForForwarding(const fib::Entry& fibEntry, const ndn::Interest& interest, const Face& inFace)
+AsfStrategy::getBestFaceForForwarding(const fib::Entry& fibEntry, const Interest& interest,
+                                      const Face& inFace)
 {
   NFD_LOG_TRACE("Looking for best face for " << fibEntry.getPrefix());
 
@@ -255,7 +250,7 @@
 }
 
 void
-AsfStrategy::onTimeout(const ndn::Name& interestName, nfd::face::FaceId faceId)
+AsfStrategy::onTimeout(const Name& interestName, face::FaceId faceId)
 {
   NFD_LOG_TRACE("FaceId: " << faceId << " for " << interestName << " has timed-out");
 
@@ -277,7 +272,8 @@
 }
 
 void
-AsfStrategy::sendNoRouteNack(const Face& inFace, const Interest& interest, shared_ptr<pit::Entry> pitEntry)
+AsfStrategy::sendNoRouteNack(const Face& inFace, const Interest& interest,
+                             const shared_ptr<pit::Entry>& pitEntry)
 {
   NFD_LOG_DEBUG(interest << " from=" << inFace.getId() << " noNextHop");
 
diff --git a/daemon/fw/asf-strategy.hpp b/daemon/fw/asf-strategy.hpp
index ad00a3d..8975d6b 100644
--- a/daemon/fw/asf-strategy.hpp
+++ b/daemon/fw/asf-strategy.hpp
@@ -47,39 +47,35 @@
   explicit
   AsfStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
 
-  virtual
-  ~AsfStrategy();
-
 public: // triggers
   virtual void
-  afterReceiveInterest(const Face& inFace,
-                       const Interest& interest,
-                       shared_ptr<pit::Entry> pitEntry) override;
+  afterReceiveInterest(const Face& inFace, const Interest& interest,
+                       const shared_ptr<pit::Entry>& pitEntry) override;
 
   virtual void
-  beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
+  beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
                         const Face& inFace, const Data& data) override;
 
   virtual void
   afterReceiveNack(const Face& inFace, const lp::Nack& nack,
-                   shared_ptr<pit::Entry> pitEntry) override;
+                   const shared_ptr<pit::Entry>& pitEntry) override;
 
 private:
   void
   forwardInterest(const Interest& interest,
                   const fib::Entry& fibEntry,
-                  shared_ptr<pit::Entry> pitEntry,
+                  const shared_ptr<pit::Entry>& pitEntry,
                   Face& outFace,
                   bool wantNewNonce = false);
 
   Face*
-  getBestFaceForForwarding(const fib::Entry& fibEntry, const ndn::Interest& interest, const Face& inFace);
+  getBestFaceForForwarding(const fib::Entry& fibEntry, const Interest& interest, const Face& inFace);
 
   void
-  onTimeout(const ndn::Name& interestName, nfd::face::FaceId faceId);
+  onTimeout(const Name& interestName, face::FaceId faceId);
 
   void
-  sendNoRouteNack(const Face& inFace, const Interest& interest, shared_ptr<pit::Entry> pitEntry);
+  sendNoRouteNack(const Face& inFace, const Interest& interest, const shared_ptr<pit::Entry>& pitEntry);
 
 public:
   static const Name STRATEGY_NAME;
diff --git a/daemon/fw/best-route-strategy.cpp b/daemon/fw/best-route-strategy.cpp
index b97afca..ac166f4 100644
--- a/daemon/fw/best-route-strategy.cpp
+++ b/daemon/fw/best-route-strategy.cpp
@@ -37,14 +37,9 @@
 {
 }
 
-BestRouteStrategy::~BestRouteStrategy()
-{
-}
-
 void
-BestRouteStrategy::afterReceiveInterest(const Face& inFace,
-                                        const Interest& interest,
-                                        shared_ptr<pit::Entry> pitEntry)
+BestRouteStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
+                                        const shared_ptr<pit::Entry>& pitEntry)
 {
   if (hasPendingOutRecords(*pitEntry)) {
     // not a new Interest, don't forward
diff --git a/daemon/fw/best-route-strategy.hpp b/daemon/fw/best-route-strategy.hpp
index 9480b96..b24f62e 100644
--- a/daemon/fw/best-route-strategy.hpp
+++ b/daemon/fw/best-route-strategy.hpp
@@ -45,15 +45,12 @@
 class BestRouteStrategy : public Strategy
 {
 public:
+  explicit
   BestRouteStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
 
-  virtual
-  ~BestRouteStrategy();
-
   virtual void
-  afterReceiveInterest(const Face& inFace,
-                       const Interest& interest,
-                       shared_ptr<pit::Entry> pitEntry) override;
+  afterReceiveInterest(const Face& inFace, const Interest& interest,
+                       const shared_ptr<pit::Entry>& pitEntry) override;
 
 public:
   static const Name STRATEGY_NAME;
diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
index 5080d9c..e897b49 100644
--- a/daemon/fw/best-route-strategy2.cpp
+++ b/daemon/fw/best-route-strategy2.cpp
@@ -104,9 +104,8 @@
 }
 
 void
-BestRouteStrategy2::afterReceiveInterest(const Face& inFace,
-                                         const Interest& interest,
-                                         shared_ptr<pit::Entry> pitEntry)
+BestRouteStrategy2::afterReceiveInterest(const Face& inFace, const Interest& interest,
+                                         const shared_ptr<pit::Entry>& pitEntry)
 {
   RetxSuppression::Result suppression = m_retxSuppression.decide(inFace, interest, *pitEntry);
   if (suppression == RetxSuppression::SUPPRESS) {
@@ -186,7 +185,7 @@
 
 void
 BestRouteStrategy2::afterReceiveNack(const Face& inFace, const lp::Nack& nack,
-                                     shared_ptr<pit::Entry> pitEntry)
+                                     const shared_ptr<pit::Entry>& pitEntry)
 {
   int nOutRecordsNotNacked = 0;
   Face* lastFaceNotNacked = nullptr;
diff --git a/daemon/fw/best-route-strategy2.hpp b/daemon/fw/best-route-strategy2.hpp
index d78baf6..a27664f 100644
--- a/daemon/fw/best-route-strategy2.hpp
+++ b/daemon/fw/best-route-strategy2.hpp
@@ -52,17 +52,16 @@
 class BestRouteStrategy2 : public Strategy
 {
 public:
+  explicit
   BestRouteStrategy2(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
 
   virtual void
   afterReceiveInterest(const Face& inFace, const Interest& interest,
-
-                       shared_ptr<pit::Entry> pitEntry) override;
+                       const shared_ptr<pit::Entry>& pitEntry) override;
 
   virtual void
   afterReceiveNack(const Face& inFace, const lp::Nack& nack,
-
-                   shared_ptr<pit::Entry> pitEntry) override;
+                   const shared_ptr<pit::Entry>& pitEntry) override;
 
 public:
   static const Name STRATEGY_NAME;
diff --git a/daemon/fw/broadcast-strategy.cpp b/daemon/fw/broadcast-strategy.cpp
index 3a3249c..253efc8 100644
--- a/daemon/fw/broadcast-strategy.cpp
+++ b/daemon/fw/broadcast-strategy.cpp
@@ -40,9 +40,8 @@
 }
 
 void
-BroadcastStrategy::afterReceiveInterest(const Face& inFace,
-                   const Interest& interest,
-                   shared_ptr<pit::Entry> pitEntry)
+BroadcastStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
+                                        const shared_ptr<pit::Entry>& pitEntry)
 {
   if (m_isFirstUse) {
     NFD_LOG_WARN("The broadcast strategy has been renamed as multicast strategy. "
diff --git a/daemon/fw/broadcast-strategy.hpp b/daemon/fw/broadcast-strategy.hpp
index 1f868b5..1ef781c 100644
--- a/daemon/fw/broadcast-strategy.hpp
+++ b/daemon/fw/broadcast-strategy.hpp
@@ -37,12 +37,12 @@
 class BroadcastStrategy : public MulticastStrategy
 {
 public:
+  explicit
   BroadcastStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
 
   virtual void
-  afterReceiveInterest(const Face& inFace,
-                       const Interest& interest,
-                       shared_ptr<pit::Entry> pitEntry) override;
+  afterReceiveInterest(const Face& inFace, const Interest& interest,
+                       const shared_ptr<pit::Entry>& pitEntry) override;
 
 public:
   static const Name STRATEGY_NAME;
diff --git a/daemon/fw/client-control-strategy.cpp b/daemon/fw/client-control-strategy.cpp
index 0779cc1..147b936 100644
--- a/daemon/fw/client-control-strategy.cpp
+++ b/daemon/fw/client-control-strategy.cpp
@@ -40,14 +40,9 @@
 {
 }
 
-ClientControlStrategy::~ClientControlStrategy()
-{
-}
-
 void
-ClientControlStrategy::afterReceiveInterest(const Face& inFace,
-                                            const Interest& interest,
-                                            shared_ptr<pit::Entry> pitEntry)
+ClientControlStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
+                                            const shared_ptr<pit::Entry>& pitEntry)
 {
   shared_ptr<lp::NextHopFaceIdTag> tag = interest.getTag<lp::NextHopFaceIdTag>();
   if (tag == nullptr) {
diff --git a/daemon/fw/client-control-strategy.hpp b/daemon/fw/client-control-strategy.hpp
index 2a3bbb2..68b4441 100644
--- a/daemon/fw/client-control-strategy.hpp
+++ b/daemon/fw/client-control-strategy.hpp
@@ -40,15 +40,12 @@
 class ClientControlStrategy : public BestRouteStrategy
 {
 public:
+  explicit
   ClientControlStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
 
-  virtual
-  ~ClientControlStrategy();
-
   virtual void
-  afterReceiveInterest(const Face& inFace,
-                       const Interest& interest,
-                       shared_ptr<pit::Entry> pitEntry) override;
+  afterReceiveInterest(const Face& inFace, const Interest& interest,
+                       const shared_ptr<pit::Entry>& pitEntry) override;
 
 public:
   static const Name STRATEGY_NAME;
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 5373d03..44c8c52 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -38,9 +38,8 @@
 }
 
 void
-MulticastStrategy::afterReceiveInterest(const Face& inFace,
-                                        const Interest& interest,
-                                        shared_ptr<pit::Entry> pitEntry)
+MulticastStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
+                                        const shared_ptr<pit::Entry>& pitEntry)
 {
   const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
   const fib::NextHopList& nexthops = fibEntry.getNextHops();
diff --git a/daemon/fw/multicast-strategy.hpp b/daemon/fw/multicast-strategy.hpp
index 1330186..2ab3f8d 100644
--- a/daemon/fw/multicast-strategy.hpp
+++ b/daemon/fw/multicast-strategy.hpp
@@ -39,9 +39,8 @@
   MulticastStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
 
   virtual void
-  afterReceiveInterest(const Face& inFace,
-                       const Interest& interest,
-                       shared_ptr<pit::Entry> pitEntry) override;
+  afterReceiveInterest(const Face& inFace, const Interest& interest,
+                       const shared_ptr<pit::Entry>& pitEntry) override;
 
 public:
   static const Name STRATEGY_NAME;
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index 213ce59..b127fea 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -39,18 +39,13 @@
 {
 }
 
-NccStrategy::~NccStrategy()
-{
-}
-
 const time::microseconds NccStrategy::DEFER_FIRST_WITHOUT_BEST_FACE = time::microseconds(4000);
 const time::microseconds NccStrategy::DEFER_RANGE_WITHOUT_BEST_FACE = time::microseconds(75000);
 const time::nanoseconds NccStrategy::MEASUREMENTS_LIFETIME = time::seconds(16);
 
 void
-NccStrategy::afterReceiveInterest(const Face& inFace,
-                                  const Interest& interest,
-                                  shared_ptr<pit::Entry> pitEntry)
+NccStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
+                                  const shared_ptr<pit::Entry>& pitEntry)
 {
   const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
   const fib::NextHopList& nexthops = fibEntry.getNextHops();
@@ -59,8 +54,7 @@
     return;
   }
 
-  shared_ptr<PitEntryInfo> pitEntryInfo =
-    pitEntry->getOrCreateStrategyInfo<PitEntryInfo>();
+  shared_ptr<PitEntryInfo> pitEntryInfo = pitEntry->getOrCreateStrategyInfo<PitEntryInfo>();
   bool isNewPitEntry = !hasPendingOutRecords(*pitEntry);
   if (!isNewPitEntry) {
     return;
@@ -112,8 +106,7 @@
     pitEntryInfo->maxInterval = deferFirst;
   }
   pitEntryInfo->propagateTimer = scheduler::schedule(deferFirst,
-    bind(&NccStrategy::doPropagate, this,
-         weak_ptr<pit::Entry>(pitEntry)));
+    bind(&NccStrategy::doPropagate, this, weak_ptr<pit::Entry>(pitEntry)));
 }
 
 void
@@ -182,7 +175,7 @@
 }
 
 void
-NccStrategy::beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
+NccStrategy::beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
                                    const Face& inFace, const Data& data)
 {
   if (!pitEntry->hasInRecords()) {
@@ -220,7 +213,7 @@
 }
 
 NccStrategy::MeasurementsEntryInfo&
-NccStrategy::getMeasurementsEntryInfo(shared_ptr<pit::Entry> entry)
+NccStrategy::getMeasurementsEntryInfo(const shared_ptr<pit::Entry>& entry)
 {
   measurements::Entry* measurementsEntry = this->getMeasurements().get(*entry);
   return this->getMeasurementsEntryInfo(measurementsEntry);
diff --git a/daemon/fw/ncc-strategy.hpp b/daemon/fw/ncc-strategy.hpp
index 80e2918..5043ee3 100644
--- a/daemon/fw/ncc-strategy.hpp
+++ b/daemon/fw/ncc-strategy.hpp
@@ -36,18 +36,15 @@
 class NccStrategy : public Strategy
 {
 public:
+  explicit
   NccStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
 
-  virtual
-  ~NccStrategy();
+  virtual void
+  afterReceiveInterest(const Face& inFace, const Interest& interest,
+                       const shared_ptr<pit::Entry>& pitEntry) override;
 
   virtual void
-  afterReceiveInterest(const Face& inFace,
-                       const Interest& interest,
-                       shared_ptr<pit::Entry> pitEntry) override;
-
-  virtual void
-  beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
+  beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
                         const Face& inFace, const Data& data) override;
 
 PUBLIC_WITH_TESTS_ELSE_PROTECTED:
@@ -105,7 +102,7 @@
     }
 
     virtual
-    ~PitEntryInfo();
+    ~PitEntryInfo() override;
 
   public:
     /// timer that expires when best face does not respond within predicted time
@@ -121,7 +118,7 @@
   getMeasurementsEntryInfo(measurements::Entry* entry);
 
   MeasurementsEntryInfo&
-  getMeasurementsEntryInfo(shared_ptr<pit::Entry> entry);
+  getMeasurementsEntryInfo(const shared_ptr<pit::Entry>& entry);
 
   /// propagate to another upstream
   void
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index f645369..53b8935 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -37,32 +37,29 @@
   , beforeRemoveFace(forwarder.getFaceTable().beforeRemove)
   , m_name(name)
   , m_forwarder(forwarder)
-  , m_measurements(m_forwarder.getMeasurements(),
-                   m_forwarder.getStrategyChoice(), *this)
+  , m_measurements(m_forwarder.getMeasurements(), m_forwarder.getStrategyChoice(), *this)
 {
 }
 
-Strategy::~Strategy()
-{
-}
+Strategy::~Strategy() = default;
 
 void
-Strategy::beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
+Strategy::beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
                                 const Face& inFace, const Data& data)
 {
   NFD_LOG_DEBUG("beforeSatisfyInterest pitEntry=" << pitEntry->getName() <<
-    " inFace=" << inFace.getId() << " data=" << data.getName());
+                " inFace=" << inFace.getId() << " data=" << data.getName());
 }
 
 void
-Strategy::beforeExpirePendingInterest(shared_ptr<pit::Entry> pitEntry)
+Strategy::beforeExpirePendingInterest(const shared_ptr<pit::Entry>& pitEntry)
 {
   NFD_LOG_DEBUG("beforeExpirePendingInterest pitEntry=" << pitEntry->getName());
 }
 
 void
 Strategy::afterReceiveNack(const Face& inFace, const lp::Nack& nack,
-                           shared_ptr<pit::Entry> pitEntry)
+                           const shared_ptr<pit::Entry>& pitEntry)
 {
   NFD_LOG_DEBUG("afterReceiveNack inFace=" << inFace.getId() <<
                 " pitEntry=" << pitEntry->getName());
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 4f51f3b..4f3da2c 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -69,12 +69,12 @@
    *  - If strategy concludes that this Interest cannot be forwarded,
    *    invoke this->rejectPendingInterest so that PIT entry will be deleted shortly
    *
-   *  \note The strategy is permitted to store a shared reference to pitEntry.
-   *        pitEntry is passed by value to reflect this fact.
+   *  \warning The strategy must not retain shared_ptr<pit::Entry>, otherwise undefined behavior
+   *           may occur. However, the strategy is allowed to store weak_ptr<pit::Entry>.
    */
   virtual void
   afterReceiveInterest(const Face& inFace, const Interest& interest,
-                       shared_ptr<pit::Entry> pitEntry) = 0;
+                       const shared_ptr<pit::Entry>& pitEntry) = 0;
 
   /** \brief trigger before PIT entry is satisfied
    *
@@ -83,11 +83,11 @@
    *
    *  In this base class this method does nothing.
    *
-   *  \note The strategy is permitted to store a shared reference to pitEntry.
-   *        pitEntry is passed by value to reflect this fact.
+   *  \warning The strategy must not retain shared_ptr<pit::Entry>, otherwise undefined behavior
+   *           may occur. However, the strategy is allowed to store weak_ptr<pit::Entry>.
    */
   virtual void
-  beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
+  beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
                         const Face& inFace, const Data& data);
 
   /** \brief trigger before PIT entry expires
@@ -99,11 +99,12 @@
    *
    *  In this base class this method does nothing.
    *
-   *  \note The strategy is permitted to store a shared reference to pitEntry.
-   *        pitEntry is passed by value to reflect this fact.
+   *  \warning The strategy must not retain shared_ptr<pit::Entry>, otherwise undefined behavior
+   *           may occur. However, the strategy is allowed to store weak_ptr<pit::Entry>,
+   *           although this isn't useful here because PIT entry would be deleted shortly after.
    */
   virtual void
-  beforeExpirePendingInterest(shared_ptr<pit::Entry> pitEntry);
+  beforeExpirePendingInterest(const shared_ptr<pit::Entry>& pitEntry);
 
   /** \brief trigger after Nack is received
    *
@@ -115,12 +116,12 @@
    *
    *  In this base class this method does nothing.
    *
-   *  \note The strategy is permitted to store a shared reference to pitEntry.
-   *        pitEntry is passed by value to reflect this fact.
+   *  \warning The strategy must not retain shared_ptr<pit::Entry>, otherwise undefined behavior
+   *           may occur. However, the strategy is allowed to store weak_ptr<pit::Entry>.
    */
   virtual void
   afterReceiveNack(const Face& inFace, const lp::Nack& nack,
-                   shared_ptr<pit::Entry> pitEntry);
+                   const shared_ptr<pit::Entry>& pitEntry);
 
 protected: // actions
   /** \brief send Interest to outFace
diff --git a/tests/daemon/fw/dummy-strategy.hpp b/tests/daemon/fw/dummy-strategy.hpp
index 17831fd..737d031 100644
--- a/tests/daemon/fw/dummy-strategy.hpp
+++ b/tests/daemon/fw/dummy-strategy.hpp
@@ -41,9 +41,9 @@
   DummyStrategy(Forwarder& forwarder, const Name& name)
     : Strategy(forwarder, name)
     , afterReceiveInterest_count(0)
-    , wantAfterReceiveInterestCalls(false)
     , beforeSatisfyInterest_count(0)
     , beforeExpirePendingInterest_count(0)
+    , afterReceiveNack_count(0)
   {
   }
 
@@ -53,14 +53,10 @@
    *  otherwise, reject pending Interest action is invoked.
    */
   virtual void
-  afterReceiveInterest(const Face& inFace,
-                       const Interest& interest,
-                       shared_ptr<pit::Entry> pitEntry) override
+  afterReceiveInterest(const Face& inFace, const Interest& interest,
+                       const shared_ptr<pit::Entry>& pitEntry) override
   {
     ++afterReceiveInterest_count;
-    if (wantAfterReceiveInterestCalls) {
-      afterReceiveInterestCalls.emplace_back(inFace.getId(), interest, pitEntry);
-    }
 
     if (interestOutFace) {
       this->sendInterest(pitEntry, *interestOutFace);
@@ -71,36 +67,32 @@
   }
 
   virtual void
-  beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
-                        const Face& inFace,
-                        const Data& data) override
+  beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
+                        const Face& inFace, const Data& data) override
   {
     ++beforeSatisfyInterest_count;
   }
 
   virtual void
-  beforeExpirePendingInterest(shared_ptr<pit::Entry> pitEntry) override
+  beforeExpirePendingInterest(const shared_ptr<pit::Entry>& pitEntry) override
   {
     ++beforeExpirePendingInterest_count;
   }
 
   virtual void
-  afterReceiveNack(const Face& inFace,
-                   const lp::Nack& nack,
-                   shared_ptr<pit::Entry> pitEntry) override
+  afterReceiveNack(const Face& inFace, const lp::Nack& nack,
+                   const shared_ptr<pit::Entry>& pitEntry) override
   {
     ++afterReceiveNack_count;
   }
 
 public:
   int afterReceiveInterest_count;
-  bool wantAfterReceiveInterestCalls;
-  std::vector<std::tuple<FaceId, Interest, shared_ptr<pit::Entry>>> afterReceiveInterestCalls;
-  shared_ptr<Face> interestOutFace;
-
   int beforeSatisfyInterest_count;
   int beforeExpirePendingInterest_count;
   int afterReceiveNack_count;
+
+  shared_ptr<Face> interestOutFace;
 };
 
 } // namespace tests
