[fpc-pascal]about create method

Ingmar Tulva ingmar at zbi.ee
Fri Oct 12 10:15:14 CEST 2001

On Fri, 12 Oct 2001, Michael Van Canneyt wrote:

> > Since every class is derived from tObject, when I implement a Constructor in
> > my class I have to call "inherited create;"
> > or is not necesary?
> For the constructor not really (TObject.Create is not virtual, and empty),
> but for the destructor it  is absolutely necessary.

Are you sure? Isn't TObject.Destroy also empty? All the necessary cleanup
is perfomed by the hidden code a the end of _every_ destructor, isn't it
(at least this shoud be the way "object" model works)?

But anyway, I agree with your note about good practice.

ingmar at zbi.ee

More information about the fpc-pascal mailing list