RCArray is unsafe

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 2 12:42:47 PST 2015


On 3/2/2015 12:37 PM, Steven Schveighoffer wrote:
> Not exactly. Note that we are taking by reference S, which is NOT reference
> counted. So you are passing indirectly a reference to an RC object. You aren't
> "borrowing" that reference.

It's seems that to solve the problem, it has to be borrowed, in that a static 
check will be needed that what it points to cannot be modified/deleted through 
other references to the same data.



More information about the Digitalmars-d mailing list