> Refcounting is, of course, unsuitable for objects with circular links and I’m 
> going to have plenty of them.

You may be interested in the downgrade() method on Rc/Arc along with
the Weak pointers (they allow cycles, but also allow for destruction).

> So I’m thinking about adding per-task arenas that can be freed once the task 
> completes. It looks like it’s possible, but not implemented yet.

There is some initial support in libarena [1] you may find useful
(specifically the TypedArena)

> Additionally, RC boxes are not sendable - is there an easy way to ‘upgrade’ 
> an object graph to ARCs and then send it?

At this time, you'll have to initially create everything as an Arc,
you can't upgrade from an Rc to an Arc (totally separate)

Hope that help!

[1] - http://static.rust-lang.org/doc/master/arena/index.html
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to