Object Delete Operator delete
**Overview**
The delete operator is used to remove objects that were previously created using the new operator. It performs two primary actions: it invokes the destructor of the class associated with the object, and then it releases the memory that was occupied by that object.
**Syntax and Usage**
delete operation is successfully executed, the object descriptor that was used as the operand becomes invalid. Attempting to access the object through this descriptor afterwards will lead to undefined behavior.**Example**
//--- delete figure
delete m_shape;
m_shape = NULL; // Recommended practice to nullify descriptor
//--- create a new figure
NewShape();
**Related Concepts**
new operator