[Development] Qt 5.9's new garbage collector documentation? + root_ptr
Tim Blechmann
tim at klingt.org
Sat Jul 8 12:11:26 CEST 2017
> - the parameters of the function will remain unaffected if they are used as r-values
> - the parameters of the function will require a deep copy of the expression if they are used as l-values
https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_sharing
function foo( arg )
{
var img = readImage( arg.source );
arg.result = img;
return img;
}
required semantics: arg.result and the return value refer to the same
object.
--
btw, it may be interesting for you to read a bit about escape analysis.
More information about the Development
mailing list