Escape analysis (full scope analysis proposal)

Jarrett Billingsley jarrett.billingsley at gmail.com
Sun Nov 2 09:14:33 PST 2008


On Sun, Nov 2, 2008 at 10:39 AM, bearophile <bearophileHUGS at lycos.com> wrote:
> Andrei Alexandrescu Wrote:
>> * If people want to implement e.g. linked lists, they should do it with
>> classes.
>
> UHm... I see. But I am not sure I like that. Isn't that a waste of memory? All objects have a vtable.

No, they have a *pointer* to a vtable.  There is only one vtable per
class, allocated in static memory.  You only pay the cost of one
pointer.



More information about the Digitalmars-d mailing list