Commit 3aa62e6
committed
Move collection view cleanup to didMoveToWindow for earlier teardown
The removeFromSuperview in deinit fires too late — the ListView may still
be retained while KIF traverses the view hierarchy during test teardown.
Moving cleanup to didMoveToWindow(nil) detaches the collection view as
soon as the ListView leaves the window, preventing UICollectionViewData
from accessing a corrupted weak reference during layout.1 parent e2d6b77 commit 3aa62e6
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1113 | 1113 | | |
1114 | 1114 | | |
1115 | 1115 | | |
1116 | | - | |
| 1116 | + | |
1117 | 1117 | | |
1118 | 1118 | | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1119 | 1123 | | |
1120 | 1124 | | |
1121 | 1125 | | |
| |||
0 commit comments