OnDestroy

 (Available in 00 TS Tools(Base) - TS_Tools_Destructor)

Purpose

CALLBACK: It is adviced to use 'oObject:Destroy()'

Syntax

// See the documentation for the 'Axit' method.
oSomeClass:Axit( ) 

Description

This is where the application releases all refered to dynamicly allocated resources ( ARRAY, OBJECT, STRING ), and where all staticaly allocated memory is freed.

Note: Do not execute the 'OnDestroy()' method directly, it is adviced to call the 'Axit()' or 'Destroy()' method when destruction of the object is needed this method of destruction is optimized for speed and guaranties that the 'OnDestroy()' method is only called once.

Note: The designer of the class should be aware of the fact that the 'Destroy()' method can be called multiple times. But the 'OnDestroy()' method is called only once.

Example

METHOD OnDestroy( ) CLASS SomeClass
// Do the destructive work
   ... 
// All work should be done before calling SUPER
   SUPER:Destroy( ) 
RETURN NIL

Source

METHOD OnDestroy( ) CLASS TS_Destructor
   TSTrace Enter
   TSTrace Leave
RETURN NIL