RFC: safe ref counting

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sat May 2 18:38:18 UTC 2020


On Saturday, May 2, 2020 12:16:13 PM MDT Steven Schveighoffer via 
Digitalmars-d wrote:
> I like the plan of letting the GC ensure the memory is always valid. I'm
> just not sure about the problem of cycles. That's the one place this
> might fall down.

As I understand it, as long as nothing that the program still has access to
refers to the objects with circular references, the cycle won't be a
problem, and the GC will be able to collect them. I recall Andrei talking in
the past about having reference counting which did basically what you're
describing with the GC being left to handle the cycles.

- Jonathan M Davis





More information about the Digitalmars-d mailing list