Am 06.04.2016 16:28 schrieb "Dennis" <de...@avidsoft.com.hk>:
>
> objects unit contains
>    TObject = OBJECT
>       CONSTRUCTOR Init;
>       PROCEDURE Free;
>       FUNCTION Is_Object(P:Pointer):Boolean;
>       DESTRUCTOR Done;  Virtual;
>    END;
>
>
> On the other hand, objpash.inc contains
>        TObject = class
>        public
>           { please don't change the order of virtual methods, because
>             their vmt offsets are used by some assembler code which uses
>             hard coded addresses (FK)                                 }
>           constructor Create;
>          .....
>
> That is so confusing.
> What are other real benefits in inheriting from object unit's TObject?

It's mainly there for backwards compatibility with TP code. It's also the
base class of the FV object hierarchy.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to