In C++, a member function that is automatically called when a class object is destroyed (either by being explicitly deallocated or by going out of scope). Its purpose is to perform any cleanup work necessary before an object is destroyed. The destructor's name is the class name with a tilde (~) as a prefix. See also constructor.
A special member function that is used to destroy, or finalize, objects of its class type. A destructor has no parameters, and no return type is specified. See constructor.
A function that cleans up or deinitializes each object of a class immediately before the object is destroyed. Destructors execute when the program leaves the scope in which objects are defined and when any object is destroyed by delete. Destructors have the same name as their class, prefixed by a tilde, ~.
a class routine that cleans up an object once a program finishes using that object
a kind of counterpart for the constructor
a member that implements the actions required to destruct an instance of a class
a method called when an instance of a class is deleted, before the memory is deallocated
a method that is called when an object gets destroyed
a special function which allows you to execute commands immediately prior to the destruction of an object
a special function which is called automatically when a class is destroyed
a special kind of method that's called when an object is destroyed
a special method that destroys the object where it is called and deallocates its memory
a special method that is used to deinitialize an object
a special method typically used to perform cleanup after an object is no longer needed by the program
a subroutine that runs when an object's referent is garbage collected
This is a special function which can be included in classes, and which is executed whenever a variable of that class is destroyed (i.e. goes out of scope, or the program ends). Click here for more details. See also constructors.
In C++, a special member function that has the same name as its class, preceded by a tilde (~). It "cleans up" after an object of that class. For example, a destructor frees storage that was allocated when the object was created. A destructor has no arguments, and no return type is specified. See constructor.
A method used to clean up an object when it is finished with.
Procedure that is invoked when a object is deleted.
A special method on a class or struct that prepares the instance for destruction by the system. For more information, see Destructors.
C++ member function whose name is the class name preceded by a "~" character. It destroys values of the class type.
A special member¤ function¤ which is automatically called whenever an instance¤ of a class¤ ceases to exist.
Is a function that destroys an object.
OOPosite to a Constructor. It is automatically executed when a specific Object goes out of Scope (ceases to exist). A programmer usually places tidy-up code in here, such as releasing any dynamically allocated memory.
In object-oriented programming, a destructor (sometimes shortened to dtor) is a method which is automatically invoked when the object is destroyed. Its main purpose is to clean up and to free the resources which were acquired by the object along its life cycle and unlink it from other objects or resources invalidating any references in the process. The use of destructors is key to the concept of RAII.