Re:Rust/WinRT Public Preview
by ridiculous_fish on Friday May 01, 2020 @05:19PM
(#23046619)
WinRT is lousy with functions like Window.Current which provide global access to the current window. Any function may get access to any control at any time.
This works well even with externally refcounted objects. You can give reference to an inner object without increasing its refcount, and rely on the borrow checker not to allow the parent to decrease the refcount. Or you bump the refcount of the inner object and give it out as an independently owned object.