Compartir a través de


How delete Works 

The delete operator invokes the function operator delete. For objects of class types (class, struct, and union), the delete operator invokes the destructor for an object prior to deallocating memory (if the pointer is not null). For objects not of class type, the global delete operator is invoked. For objects of class type, the delete operator can be defined on a per-class basis; if there is no such definition for a given class, the global operator is invoked.

See Also

Reference

Expressions with Unary Operators