title: C++ making and destroying unique_ptr pointer
body: <p>I am learning ways to use pointer with <code>std::unique_ptr</code>.
  My code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;memory&gt;
  
  class object{
  public:
      void say(){
              std::cout&lt;&lt;"hi";
      }
  };
  
  int main(){
        std::unique_ptr&lt;object&gt; p = 
                    std::unique_ptr&lt;object&gt;(new object);
        p-&gt;say();
  }
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li><p>Am I using <code>std::unique_ptr</code> correctly?</p></li>
  <li><p>How can I delete or remove this (<code>p</code>) pointer, so there is no memory usage or leak?</p></li>
  </ol>