delete

Syntax:

    delete p;
    delete[] pArray;

The delete operator frees the memory pointed to by p. The argument should have been previously allocated by a call to new or 0. The second form of delete should be used to delete an array that was allocated with “new []”. If (in either forms) the argument is 0 (NULL), nothing is done.

Related Topics: free, malloc, new