keywords:delete

C++ Reference

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. If (in either forms) the argument is 0, nothing is done.

Related Topics: free, malloc, new