Define the destructor
- Last Updated: October 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
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 Create and destroy a class instance. For more information on defining destructors, see Define the class destructor.