'this' in base class out contract

Michael Shulman viritrilbia at gmail.com
Sat Jun 4 08:58:56 PDT 2011


On Sat, Jun 4, 2011 at 4:27 AM, bearophile <bearophileHUGS at lycos.com> wrote:
>> x: 14e2fd0
>> Klass2.this: 14e2fd0
>> Klass1.this: 41d1b0
>> Klass1.stored: 14e2fd0
>
> Note how much different are the two values of the object references. They may even be in two different kinds of memory. Klass1.this may be in the static segment instead of the heap :-)

Why would that be?


More information about the Digitalmars-d-learn mailing list