Destructor Statement

Identifies the code to run when an instance of a class is destroyed.

Syntax

Destructor
    [ statements ]
End [ Destructor ]

Parts

statements
Optional 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

Usually a destructor is necessary to free a system resource, for example an Internet socket.

Only one destructor is permitted in 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