DIP77 - Fix unsafe RC pass by 'ref'

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 10 03:27:24 PDT 2015


On 4/10/2015 2:54 AM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= 
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> On Friday, 10 April 2015 at 09:28:57 UTC, Walter Bright wrote:
>> Please read the DIP again. The copy happens earlier.
>
> But one cannot keep a stateful resource alive by copying memory. One would have
> to take ownership to keep it alive. In order to do that you need a model for
> ownership.

That's what ref counting is about.


More information about the Digitalmars-d mailing list