title: C++: Get unique_ptr which owns row pointer
body: <p>I have unique_ptr and a row pointer that the unique_ptr points to. How do I call release for unique_ptr using only row pointer rowPtr?</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;memory&gt;
  
  int main()
  {
      std::unique_ptr&lt;int&gt; uniqPtr = std::make_unique&lt;int&gt;(2);
      int* rowPtr = uniqPtr .get();
  
      // call .release for uniqPtr using only rowPtr
      
      return 0;
  }
  </code></pre>
  <p>UPD:
  I will clarify the question. I need uniqPtr to become empty using only rowPtr.</p>