classInstanceSize and vtable

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Oct 23 17:12:19 PDT 2014


Etienne Cimon:

> I'm not sure, why does a final class carry a vtable pointer?

In D all class instances contain a pointer to the class and a 
monitor pointer. The table is used for run-time reflection, and 
for standard virtual methods like toString, etc.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list