escapeByRef

e is an expression to be returned by 'ref'. Walk e to determine which variables are possibly being returned by ref, such as: ref int function(int i) { return i; } If e is a form of *p, determine which variables have content which is being returned as ref, such as: ref int function(int* p) { return *p; } Multiple variables can be inserted, because of expressions like this: ref int function(bool b, int i, int* p) { return b ? i : *p; }

No side effects.

void
escapeByRef
(,,
bool live = false
)

Parameters

e

expression to be returned by 'ref'

er

where to place collected data

live
Type: bool

if @live semantics apply, i.e. expressions p, *p, **p, etc., all return p.

Meta