DIP77 - Fix unsafe RC pass by 'ref'

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 8 18:35:24 PDT 2015


On 4/8/2015 5:49 PM, weaselcat wrote:
> On Wednesday, 8 April 2015 at 23:11:08 UTC, Walter Bright wrote:
>> http://wiki.dlang.org/DIP77
>
> Can this be clarified a little?
>> The lifetime of tmp will be the same as that of a temporary with a destructor.
>
> Does that mean the lifetime of tmp is tied to the scope of the function being
> called, or the current scope calling the function?

The same as that of a tmp being returned from a function - to the end of the 
expression.


More information about the Digitalmars-d mailing list