[fpc-devel] Class property and virtual getter
Michael Van Canneyt
michael at freepascal.org
Wed May 28 09:35:19 CEST 2014
On Wed, 28 May 2014, Michael Schnell wrote:
> On 05/26/2014 08:25 PM, Sven Barth wrote:
>>
>> Here... happy now? ;)
> Very happy indeed :-) .
>
> (Silly me did not remember the "ClassName" property. With same the test is as
> easy as you showed.)
>
> Now thinking about why I had been confused is that obviously "self" of an
> instance _does_ determine the VMT of the class it is an instance of. That is
> why I erroneously assumed only an instance has a VMT. Now after learning that
> the VMT is provided already for the class itself seemingly as a static
> record, I wonder if the dynamic instance record has a just a pointer to the
> VMT of the class or if the classes VMT gets copied when creating an
> instance.
AFAIK : Just a pointer to the correct VMT.
Michael.
More information about the fpc-devel
mailing list