-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] GroupHeaderTemplate leaks Memory #6761
Comments
Very nice sample, thanks!. I have been doing several tests with it and effectively, using GroupHeaderTemplate leaks Memory. |
We are also facing the memory leaks in group header template. In our scenario we have binding the custom views in this template and clearing this in view disappearing but the application memory is not getting deallocated even when the page is removed from the view.Please let us know which version of the xamarin forms have this fix |
I am working on a fix for this one also. |
Curious finding - simply having a listview showing a bunch of empty groups, just scrolling the list up and down many times causes memory to skyrocket. |
I've got a working solution now that removes pretty much all memory leaks when using ListView that has any kind of group header. Formalizing it and will do a PR shortly. |
…ers. TemplatedItemsList: Ensure items are unhooked correctly when removing them, whether as individual removals or list resets. Without this, the native cells do not actually get removed. CellTableViewCell: use event PropertyChangedEventHandler instead of action (seems more standard) TextCellRenderer: Correct the event delegate hookup ListViewRenderer: Actually re-use the UITableViewCell when creating header sections, otherwise we endlessly create new ones, leaving the old ones alive through event handlers
…ader binding types
Description
When I repeat that I add items to ListView with GroupHeaderTemplate and clear items,
GC.GetTotalMemory(true) is increasing.
Steps to Reproduce
Expected Behavior
GC.GetTotalMemory(true) dosen't increase.
Actual Behavior
GC.GetTotalMemory(true) increases.
Basic Information
iPod touch 6
Screenshots
sorry for this isn't specified format
MomentAppCrashes.mp4.zip
Reproduction Link
MemoryTest.zip
The text was updated successfully, but these errors were encountered: