can't delete array that is class field
<p>I have class <code>cAuthorisation</code> that manages array of <code>strAuthorisation</code>
function <code>resize</code> prepares aray for next record. </p>

<p>During  <code>resize</code> , on line <code>delete [] data;</code> I have crash.</p>

<pre><code>struct strAuthorisation 
{ 
double Amount; 
}Authorisation;

class cAuthorisation { 
public: 
    int size; 
    strAuthorisation *data; 
cAuthorisation ()
{
    size=0;
}

~cAuthorisation()
{

};

void Add(strAuthorisation )
{
    resize();
    data[size]=*value;
}

void resize() 
{
    strAuthorisation *a = new strAuthorisation[5];
    size_t newSize = size + 1 ;
    strAuthorisation *newArr = new strAuthorisation[newSize];
    memcpy( newArr, data, size * sizeof(strAuthorisation) );

    size = newSize;

    delete [] data;
    data = newArr;
}
} Authorisations;
</code></pre>

<p>Why it is not possible delete class array?</p>
