Closed robcecil closed 6 years ago
I have pushed a new version (0.6.4) which fixes a reference that should have been weak. When testing removal/allocating I see that memory sticks where expected on my end. Can you test and see if you are still seeing the same issue?
Thanks. Will test shortly
I repeated my test and I didn't find any leaked instances of either the Grid or the layout.
I was examining the memory footprint of my app over time, as I performed some central functions that involve creating instances of SwiftGridView. In my app, I support multiple instances open, through a tab interface:
In my test, I opened four of my 'views', each of which corresponds to an instance of a SwiftGridView. Then I closed each of them, for an empty environment.
Then I invoked the memory graph tool in Xcode. I searched to verify that my pertinent class instances were not leaked (in my case, GridViewController and GridViewModel). They were cleaned up.
BUT I noticed that all four instances of the SwiftGridView (and corresponding SwiftGridLayout) were still around, as well as many hundreds of my UICollectionViewCell derivatives (a modified BasicTextCell, plus some sibling classes).