Resolve remaining iOS widget memory leaks.
A follow up to #2850; this resolves the remaining widget memory leaks on iOS.
The underlying issue is one that has been previously solved on macOS, but the fix wasn't ported to iOS. Constraint objects are ObjC instances that are referenced by ObjC widgets; however, if the underlying widget is garbage collected before the constraint, the widget reference no longer exists, and so it can't be removed from the constraint. This causes a segfault when the constraint is disposed.
macOS added a fix for this some time ago; but the same fix wasn't applied to iOS. This ports the fix over to iOS, which then in turn allows the remaining iOS memory leaks to be resolved.
Refs #2849.
PR Checklist:
- [x] All new features have been tested
- [x] All new features have been documented
- [x] I have read the CONTRIBUTING.md file
- [x] I will abide by the code of conduct
Unfortunately it's still crashing in or immediately after test_optioncontainer, and the rerun is the same.
Whelp... thought I had it. Back to the drawing board, I guess...
With the changes in Rubicon 0.5.0, the remaining iOS memory leaks have now been resolved.