DIP77 - Fix unsafe RC pass by 'ref'

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 9 14:47:21 PDT 2015


On 4/9/2015 12:58 PM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= 
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> On Thursday, 9 April 2015 at 01:35:54 UTC, Walter Bright wrote:
>> The same as that of a tmp being returned from a function - to the end of the
>> expression.
>
> But how will this work with anything that makes RCArrays reachable through
> indirections...? Is the compiler going to do a recursive scan and create
> temporaries of all RC-pointers that are reachable?
>
> (e.g. RCArrays of RCArrays)


It examines the types of all mutable values available to the function.

Note the discussion of the effect of purity in the DIP.


More information about the Digitalmars-d mailing list