Class constructors are constructors/destructors
that are called once when your program starts/finishes.
TSomeClass =
class
private
{ new class constructor and destructor }
class constructor Create;
class destructor Destroy;
public
{ regular class instance constructor and destructor }
constructor Create;
destructor Destroy; override;
end;
Using
these as an alternative to unit initialization/finalization clauses
can result in smaller executables. This is because
initialization/finalization clauses are always executed so the
smart linker has no choice but to link in all the related classes.
The smart linker is much better at eliminating unused classes when
class constructors are used instead.
The VCL
uses class constructor to ensure the gesturing framework is only
included in applications that require it.
Class
constructors/destructors will operate no matter what their
visibility. Since they cannot be called explicitly from code, it is
good practice to move them into the private section of your class
to differentiate them from your regular instance
constructors/destructors.
Further reading
Alex Ciobanu (Emb.) introduces class constructors
and discusses a issue when using generics and class
constructors. http://alex.ciobanu.org/?p=258