[fpc-devel] Faster InitObject

Amir amir at aavani.net
Thu Feb 23 19:25:43 CET 2012


On 02/23/2012 01:20 AM, Alexander Shishkin wrote:

> 1) You can override TObject.NewInstance, w|o calling inherited. (Init
> instance is called from NewInstance) and do whatever you want
>

What does each of the follwoing lines do? It looks like they are setting 
the function table for the object. So, I need them in my new NewInstance 
Implementation, don't I?

ppointer(instance)^:=pointer(self);
if PVmt(self)^.vIntfTable <> @emptyintf then
   InitInterfacePointers(self,instance);
InitInstance:=TObject(Instance);

Amir



More information about the fpc-devel mailing list