PreviousNextIndex

DESTRUCTOR statement

Defines a destructor for a class. A destructor is a special type of method that the AVM invokes when an instance of the class is deleted, either manually using the DELETE OBJECT statement or automatically through garbage collection.

Note: This statement is applicable only when used in a class definition (.cls) file.
Syntax

DESTRUCTOR [ PUBLIC ] class-name ( ) : 
destructor-body  

[ PUBLIC ]
class-name
destructor-body
method-logic
END [ DESTRUCTOR ]
Example

The following example shows the definition of a destructor:

DESTRUCTOR PUBLIC CustObj( ): 
  EMPTY TEMP-TABLE ttCust. 
END DESTRUCTOR. 

Notes
See also

CLASS statement, CONSTRUCTOR statement, DELETE OBJECT statement


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex