Finalization

From Lazarus wiki

Deutsch (de) English (en) suomi (fi) русский (ru)

Finalization is a reserved word within Object Pascal. It starts the optional finalization part of a unit.

Structure of a unit

 unit ...;      // Name of the unit

 interface      // Everything declared here may be used by this and other units (public)

 uses ...;

   ...

 implementation // The implementation of the requirements for this unit only (private)

 uses ...;

   ...

 initialization // Optional section: variables, data etc initialised here

   ...

 finalization   // Optional section: code executed when the program ends

   ...
 end.

See also