is it perfectly ok to return a naked pointer to a unique_ptr from a class
<p>Is it ok to do the following? Obviously the caller is not prevented from deleting the naked pointer. Should I use shared_ptr and return a shared_ptr? It seems too heavy for this.</p>

<pre><code>class A
{
   B* GetB() { return pointer.get(); }
private:
   unique_ptr&lt;B&gt; pointer;
};
</code></pre>
