escaping addresses of ref parameters - not

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Feb 8 22:09:43 PST 2009


Jason House wrote:
> What constitutes escaping?

The callee tucks away the address of the ref parameter, or the address 
of a direct field of it.

> If any other functions are called with
> the parameter, even if they're const(T), it can still escape.  It may
> be easiest to start with worrying about mutable references for now
> and then extend to const references later.

const is orthogonal.


Andrei



More information about the Digitalmars-d mailing list