readonly?

David Nadlinger see at klickverbot.at
Tue Jul 10 23:48:57 PDT 2012


On Wednesday, 11 July 2012 at 06:34:29 UTC, Tobias Pankrath wrote:
>> This escapes a stack reference.
>
> Ins't b supposed to be allocated on the heap?

The Bar instance is, but the pointer to it is not. Making _b a 
Rebindable instead of using a pointer (to what effectively is a 
pointer to the real object) should help.

David


More information about the Digitalmars-d-learn mailing list