I kinda wish #objc / #Swift had a garbage collector in debug mode, not the usual kind for freeing memory (Apple already tried that...) — but one that would detect memory lost to strong reference cycles.
Kind of like Valgrind, but with more insight into the language ("this view controller instance is kept alive because you've implicitly captured a strong reference to self in this block, which is strongly referenced by this view model, which is stored in a property of the same view controller").
@bugaevc Had a bug like the other day in Rust. I had a Rust srtuct Foo that contained references to gtk widgets and a gst_player instance. I had wrapped the whole thing in an Rc and pass that to callbacks.
But then you would switch views and drop the gtk widget but the gstreamer player would continue to be alive cause I had passed strong ref to the gst callbacks which kept it alive.
Now I opt to use weak refs by default, and surprisingly stuff keep working.