Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
AdamEssenmacher opened this issue Jan 27, 2024 · 1 comment · Fixed by #22067
Closed

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

AdamEssenmacher opened this issue Jan 27, 2024 · 1 comment · Fixed by #22067
Assignees
Labels
area-controls-listview ListView and TableView platform/iOS 🍎 t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.)
Milestone

Comments

@AdamEssenmacher
Copy link

AdamEssenmacher commented Jan 27, 2024

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

@AdamEssenmacher AdamEssenmacher added the t/bug Something isn't working label Jan 27, 2024
@PureWeen PureWeen added the legacy-area-perf Startup / Runtime performance label Jan 30, 2024
@PureWeen PureWeen added this to the Backlog milestone Jan 30, 2024
@ghost
Copy link

ghost commented Jan 30, 2024

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@PureWeen PureWeen modified the milestones: Backlog, .NET 8 SR6 May 1, 2024
@Eilon Eilon added t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) and removed legacy-area-perf Startup / Runtime performance labels May 10, 2024
@PureWeen PureWeen assigned PureWeen and unassigned jonathanpeppers May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-listview ListView and TableView platform/iOS 🍎 t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.)
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants