In the destructor, free the memory allocated for elementReader_.partialData.
diff --git a/ndn-cpp/transport/tcp-transport.hpp b/ndn-cpp/transport/tcp-transport.hpp
index 9167beb..57d9554 100644
--- a/ndn-cpp/transport/tcp-transport.hpp
+++ b/ndn-cpp/transport/tcp-transport.hpp
@@ -18,6 +18,7 @@
   {
     ndn_TcpTransport_init(&transport_);
     face_ = 0;
+    elementReader_.partialData.array = 0;
   }
   
   /**
@@ -47,6 +48,8 @@
    */
   virtual void close();
   
+  ~TcpTransport();
+  
 private:
   struct ndn_TcpTransport transport_;
   Face *face_;