diff --git a/ndn-cpp/name.cpp b/ndn-cpp/name.cpp
index 488fcd5..dedbfd1 100644
--- a/ndn-cpp/name.cpp
+++ b/ndn-cpp/name.cpp
@@ -113,35 +113,32 @@
     if (component.size() <= 2)
       // Zero, one or two periods is illegal.  Ignore this component.
       return false;
-    else {
+    else
       // Remove 3 periods.
-      value_.clear();
-      value_.insert(value_.begin(), component.begin() + 3, component.end()); 
-    }
+      value_ = Blob((const unsigned char *)&component[3], component.size() - 3); 
   }
-  else {
-    value_.clear();
-    value_.insert(value_.begin(), component.begin(), component.end()); 
-  }
+  else
+    value_ = Blob((const unsigned char *)&component[0], component.size()); 
   
   return true;
 }
 
 void Name::Component::setSegment(unsigned long segment)
 {
-  value_.clear();
+  ptr_lib::shared_ptr<vector<unsigned char> > value;
   
   // Add the leading zero.
-  value_.push_back(0);
+  value->push_back(0);
   
   // First encode in little endian.
   while (segment != 0) {
-    value_.push_back(segment & 0xff);
+    value->push_back(segment & 0xff);
     segment >>= 8;
   }
   
   // Make it big endian.
-  reverse(value_.begin() + 1, value_.end());
+  reverse(value->begin() + 1, value->end());
+  value_ = value;
 }
 
 void Name::set(const char *uri_cstr) 
diff --git a/ndn-cpp/name.hpp b/ndn-cpp/name.hpp
index f43a924..41811f5 100644
--- a/ndn-cpp/name.hpp
+++ b/ndn-cpp/name.hpp
@@ -11,6 +11,7 @@
 #include <sstream>
 #include "c/name.h"
 #include "encoding/binary-xml-wire-format.hpp"
+#include "util/blob.hpp"
 
 namespace ndn {
     
@@ -40,7 +41,7 @@
      * @param valueLen Length of value.
      */
     Component(const unsigned char *value, unsigned int valueLen) 
-    : value_(value, value + valueLen)
+    : value_(value, valueLen)
     {
     }
   
@@ -53,7 +54,7 @@
     {
       componentStruct.valueLength = value_.size(); 
       if (value_.size() > 0)
-        componentStruct.value = (unsigned char *)&value_[0];
+        componentStruct.value = (unsigned char*)value_.buf();
     }
   
     /**
@@ -66,7 +67,7 @@
      */
     bool setFromEscapedString(const char *first, const char *last);
   
-    const std::vector<unsigned char>& getValue() const { return value_; }
+    const std::vector<unsigned char>& getValue() const { return (*value_); }
     
     /**
      * Set this component to the encoded segment number.
@@ -75,7 +76,7 @@
     void setSegment(unsigned long segment);
   
   private:
-    std::vector<unsigned char> value_;
+    Blob value_;
   }; 
   
   /**
