Conceptual
Login

Weak References

Rc/Arc cycles never reach a strong count of zero, so cyclic structures leak; Weak<T> holds a non-owning back-edge that does not keep the value alive. Weak::upgrade returns Option<Rc<T>>, forcing callers to handle the case where the target was already dropped.

This Concept is waiting for its first lesson!

Rc/Arc cycles never reach a strong count of zero, so cyclic structures leak; Weak<T> holds a non-owning back-edge that does not keep the value alive. Weak::upgrade returns Option<Rc<T>>, forcing callers to handle the case where the target was already dropped.

Are you a teacher? Sign in to start contributing.

Sign In