Object-Oriented Programming (OOP)

Identify the correct definition of Destructor.

Correct answer

D. A special method automatically invoked when an object is destroyed, used to release resources.

Explanation

Destructor refers to a special method automatically invoked when an object is destroyed, used to release resources.