DIP77 - Fix unsafe RC pass by 'ref'
via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 10 00:10:37 PDT 2015
On Friday, 10 April 2015 at 07:01:47 UTC, Walter Bright wrote:
> Nope. It'll scan at compile time the types reachable through
> the parameters. If any of those types are RCO's that have a
> type that matches a ref parameter, the ref parameter's RCO will
> get copied.
But how can this work? If I provide 2 ref parameters to different
Node instances (not a RCO) in the same graph. How can I then be
sure that it will not disappear?
E.g.
ref1 -> Node->RCRef->Edge(RCO)->Node->RCRef->Edge(RCO)->Node"X"
ref2 -> Node"X"
More information about the Digitalmars-d
mailing list