Why destructor is used when delete is there?

When delete is used to deallocate memory for a C++ class object , the object’s destructor is called before the object’s memory is deallocated (if the object has a destructor). If the operand to the delete operator is a modifiable l-value, its value is undefined after the object is deleted.

Sizin İçin Seçtik  1000 tl'lik Bitcoin kaç TL?

Leave a Reply

Your email address will not be published. Required fields are marked *