Comparison with procedure-based programming cleanup
- Last Updated: February 15, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
With persistent procedures, the application must adhere
to an enforced programming strategy in order to allow cleanup when
the procedure exits. Typically, you do this by defining a trigger
block to be executed ON CLOSE OF THIS-PROCEDURE,
then take care to always delete a persistent procedure instance
using the APPLY "CLOSE" statement
rather than using the DELETE OBJECT statement.
(This is the convention used in procedures generated by the AppBuilder.)
A destructor provides a uniform mechanism to handle such cleanup tasks in class-based objects without the need for special programming strategies.