system/rust/src/core/shared_box.rs
0 → 100644
+90
−0
+14
−16
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
This CL introduces the abstraction of SharedBox<>, which wraps Rc<> to avoid accidental circular references / leaks. Without this, we could leak AttServerBearers by e.g. storing an Rc<> to them in a spawned future, or by actually having a circular reference. Bug: 255880936 Test: unit Change-Id: If60bd51d4ecda799de465d2e54a2976cf4e6793a