[fpc-devel] Faster InitObject

Alexander Shishkin alexvins at mail.ru
Thu Feb 23 23:35:11 CET 2012


23.02.2012 22:25, Amir пишет:
> 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);
required

> if PVmt(self)^.vIntfTable <> @emptyintf then
> InitInterfacePointers(self,instance);
required for interfaces support

> InitInstance:=TObject(Instance);
required


>
> Amir
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>




More information about the fpc-devel mailing list