Comparison with procedure-based programming persistent procedures
- Last Updated: June 1, 2021
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Using the VAR or
NEW statement to instantiate a class and assign its object
reference is roughly equivalent to running a persistent procedure and setting its procedure
object handle using the RUN statement. Just as a
procedure-based ABL application that instantiates persistent procedures must begin with a
startup procedure file that directly or indirectly creates procedure objects through other
procedure files, a class-based ABL application must also begin with a startup procedure file
that directly or indirectly creates class-based objects. (You cannot directly start up an
application with ABL using a class file as you can, for example, with Java.) When it is no
longer needed, you can use the DELETE OBJECT statement to
destroy a persistent procedure. Class instances are automatically deleted (garbage collected)
when a reference to the object no longer exists in the ABL session.