Try OpenEdge Now
skip to main content
Object-oriented Programming
Object-oriented Programming and ABL : Overview of class-based ABL : Defining the destructor
 

Defining the destructor

A class can define a special method called its destructor, which always executes when an instance of the class is deleted (destroyed). ABL allows you to define one destructor as a named block that always begins with the DESTRUCTOR statement and always ends with the END DESTRUCTOR statement. This destructor must have the same name as the name of the class in which it is defined. The destructor is always PUBLIC, takes no parameters, and has no return type.
For information on the ABL to destroy a class, see Creating and destroying a class instance. For more information on defining destructors, see Defining the class destructor.
* Comparison with procedure-based programming