Releasing a unique_ptr after the object is destructed
<p>Is the following code legal? My worry is the use of the <code>.release</code> method after the object has been destructed in the <code>Start</code> method.</p>

<pre><code>class Foo
{
public:
    Foo()
    {
        std::cout &lt;&lt; "Foo ctor\n";
    }

    ~Foo()
    {
        std::cout &lt;&lt; "Foo dtor\n";
    }

    void Start()
    {
        std::unique_ptr&lt;Foo&gt; ptr(this);
    }
};

int main(int argc, char* argv[])
{
    auto ptr = std::make_unique&lt;Foo&gt;();
    ptr-&gt;Start();
    ptr.release();
}
</code></pre>

<p>I tried this in vs12 and it didn't complain.</p>