what will happen if you do "delete this;" in a member function?
<p>What will exactly happen if a member function try to do <code>delete this;</code>, like in the constructor of the following class?</p>

<pre><code>class A
{
public:
    A(int);
    ~A();
    int *pi;
}

A::A(int i)
{
    delete this;
    pi = new int(i);
}

A::~A()
{
    delete pi;
}
</code></pre>
