You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ios/catalyst] fix memory leaks in ListView (#22007)
* [ios/catalyst] fix memory leaks in ListView
Fixes: #20025
I could reproduce the leak here, pretty easily with changes to `MemoryTests`.
`ListView` has several cycles that prevent garbage collection from
happening:
* `FormsUITableViewController` has `ListView _list`
* `FormsUITableViewController` -> `ListView` -> `ListViewRenderer` -> `FormsUITableViewController`
* `ListViewDataSource` has `UITableView _uiTableView`
* `ListViewDataSource` -> `UITableView` -> `ListViewDataSource`
* `ListViewDataSource` has `FormsUITableViewController _uiTableViewController`
* `ListViewDataSource` -> `FormsUITableViewController` -> `UITableView` -> `ListViewDataSource`
* `ListViewDataSource` has `protected ListView List`
* `ListViewDataSource` -> `ListView` -> `ListViewRenderer` -> `FormsUITableViewController` -> `UITableView` -> `ListViewDataSource`
I changed the above fields to all be `WeakReference<T>` and the leaks
went away.
* Tentative fix for Android
Context: #18757
* Revert "Tentative fix for Android"
This reverts commit b294779.
* Ignore ListView test on Android for now
0 commit comments