|
unsigned char ** pMyArray = new unsigned char * [nMyArrayNum];
Used when releasing
delete [] pMyArray;
The result will be an error.
With loop, delete pMyArray [i]
It doesn't work either.
I ask heroes to help!
Question supplement: Use the following code, there is no problem when compiling and linking, but an error will pop up when running.
if (pMyArray! = NULL)
{
delete [] pMyArray;
pMyArray = NULL;
}
The pointer memory in the array is still useful, so it is not deleted, only the pointer array is deleted. |
|