Destructor Statement

Defines the code to execute when an instance of a class is destroyed.

Syntax

Destructor
    [ statements ]
End [ Destructor ]

Parts

statements
Optional executable statements.
End
Completes the statement. You can also use End Destructor.
You can change the syntax of this part. See @Option Directive for more information.

Instructions

Typically, a destructor is needed to free a system resource, such as an Internet socket, for example.

Only one destructor is permitted within a class. You must put the destructor after all constructors and before all procedures of the types Function, Method, Property, or Sub.

Examples

TODO

See also