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

No leaks now in the first ListView test. #1

Merged
merged 1 commit into from
Feb 12, 2021
Merged

No leaks now in the first ListView test. #1

merged 1 commit into from
Feb 12, 2021

Conversation

t-johnson
Copy link
Collaborator

Doesn't seem to leak for me when run in Release mode on IOS Simulator.

Doesn't seem to leak for me when run in Release mode on IOS Simulator.
@t-johnson
Copy link
Collaborator Author

@AlanYost looks like whitespace got changed in my commit - compare with ignoring whitespace to see the changes.

@AlanYost AlanYost merged commit d2dd6c3 into main Feb 12, 2021
@AlanYost
Copy link
Owner

Thanks @t-johnson - I'll give it a blast in a while. Heading out soon for a few hours but will be back to test. I really appreciate your input.

@t-johnson
Copy link
Collaborator Author

@AlanYost you're too quick! i just realized i missed some files when i committed.

@AlanYost
Copy link
Owner

@t-johnson - Mmmm not sure what is different between our environments but my physical iPad running iOS 14.4 is still leaking on the ListView. You have to set the Items count to 50 and then goto the listview and tap on a few different rows whilst also scrolling in between taps. It always leaks for me if I do that.... Are you pointing to the same XF nuget package?

@VladYambay
Copy link
Collaborator

I have retested the latest changes where the ListView binds directly to the ObservableCollection in the view model with Xamarin.Forms 5.0.0.6998 on a physical iPad device (iOS 14.3). I can confirm that it's still leaking memory in the ListView test with Items count set to 50 and tapping three times or more on any row to reload the collection of items. Please note that it does not leak memory if I tap one or two times, the issue appears only when I tap 3 or more times and use more than 20 items in the collection (might depend on how many items can fit on the screen of a testing device).

@t-johnson , @AlanYost - FYI and thank you for looking into this issue.

@t-johnson
Copy link
Collaborator Author

@VladYambay can confirm - clicking three times with 50 items seems to trigger the leak.
and @AlanYost, I am only testing against the last stable release of Xamarin Forms 5.

@t-johnson
Copy link
Collaborator Author

This sample might be suffering from memory leaks that are addressed in xamarin/Xamarin.Forms#12535
In that case, there were several places where modifications to the collection the list is bound to would leak. this was fixing grouped listviews, but i believe the fix also addresses similarissues in non-grouped listviews.
i've no idea why it takes so long for a PR to get approved in the XamarinForms project... its kind of frustrating as both these PRs i did are now 3+ months old...

@VladYambay VladYambay changed the title No leaks now in the fitst ListView test. No leaks now in the first ListView test. Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants