Hello !
I didn't have found a satisfying answer in the archives to the following problem:
In BP the constructor of TObject resets all datafields to 0 by assuming a simple type to the SELF-pointer with the length SIZEOF(SELF). This allowes all further derived objects to reset their datafields just by calling
INHERITED TOBJECT.INIT(...);
in their constructors. Creating Objects in Delphi resolves also zero-initialized datafields.
GPC does not so when creating a simple Object by
NEW (OBJECTPOINTER, INIT(...));
Is there a way in GPC to do something similar to the TObject-Constructor from BP within the constructor of a basic object or could it be implemented in GPC that creating a new Object with NEW will zero the memory allocated for the new object ?
Greetings, Thomas