Class destructor
- Last Updated: August 17, 2021
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
A destructor is an optional method that runs when an instance of a class is deleted or removed from memory. You define a destructor if your class needs to perform some special processing when the instance is deleted. For example, let’s assume that the Dept class contains a temp-table of its employees. If an employee leaves the department, the Emp instance is deleted, but you would also want to remove the reference to the Emp instance in the Dept instance.
For more information, see Comparison with procedure-based programming cleanup.