H
huohaodian
Hi,
I have a variable char ** test;
initialized as
test = new char*[6];
for (int i=0;i<6;i++)
{
test = new char[MAX_PATH];
}
and try to free memory as
for (int j=0;i<6;j++)
{
delete [] test[j]; // free space
test = NULL; // remove pointer
}
delete []test;
Thank in advance.
I have a variable char ** test;
initialized as
test = new char*[6];
for (int i=0;i<6;i++)
{
test = new char[MAX_PATH];
}
and try to free memory as
for (int j=0;i<6;j++)
{
delete [] test[j]; // free space
test = NULL; // remove pointer
}
delete []test;
Thank in advance.