Skip to content

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

@AdamEssenmacher

Description

@AdamEssenmacher

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.3

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

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions