Sign in Join
FPDoc Onlineexperiment

TComponent.DestroyComponents procedure

Member of TComponentpublicIn unit Classes

Destroy child components.

Declaration

pascal
procedure DestroyComponents

Description

DestroyComponents calls the destructor of all owned components, till no more components are left in the Components array.

Calling the destructor of an owned component has as the effect that the component will remove itself from the list of owned components, if nothing has disrupted the sequence of destructors.

Errors

If an overridden 'destroy' method does not call it's inherited destructor or raises an exception, it's Destroy destructor will not be called, which may result in an endless loop.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.