[fpc-pascal]create and destroy

Shifted Soul snsii at yahoo.fr
Mon Dec 17 10:01:38 CET 2001


Hello, I have two small questions, if you can give me a yes or no only.
Q1 : Can I call a method from the constructor of the same class. Example
:
TSample = CLASS
                  PUBLIC
                  CONSTRUCTOR Create;
                  DESTRUCTOR Destroy;Override;
                  PROCEDURE a;
END;

CONSTRUCTOR TSample.Create;
BEGIN
   a;
END;

Q2 : I know that the standard is to override the "destroy" destructor
and to use the free method to dstroy the object. I know also that the
standard "destroy" don't have any parameter. But I want to have a
destructor with parameters, can I do it without being out of standard,
don't tell me that I can call the destructor directly, because I gave a
sample a time ago with a direct call to the destructor which made a
great deal about standards, so I won't to make more troubles in this
mailing list.

Thanx






More information about the fpc-pascal mailing list