maui icon indicating copy to clipboard operation
maui copied to clipboard

ViewCells are not GC'ed on iOS, causing cascading memory leak

Open AdamEssenmacher opened this issue 1 year ago • 0 comments

Description

Title basically. ViewCells are simply not GC'ed on the iOS platform. It's probably all Cells.

Recommend the area/perf label....

Steps to Reproduce

Add a ListView to a page that uses a ViewCell as its data template (populated with some data).

Pop the page, force GC, observe ViewCells are not GC'ed.

Link to public reproduction project repository

No response

Version with bug

8.0.6

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

The ViewCells are leaking because the 'SetRealCell' bindable property is not nulled out, leading the the typical ref-counting leak on iOS.

Calling Dispose on the ViewCell's Handler's PlatformView property will eliminate the leak.

Relevant log output

No response

AdamEssenmacher avatar Jan 27 '24 06:01 AdamEssenmacher