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

Dispose Homepage on navigation #4472

Merged
merged 5 commits into from
May 14, 2021
Merged

Dispose Homepage on navigation #4472

merged 5 commits into from
May 14, 2021

Conversation

d2dyno1
Copy link
Member

@d2dyno1 d2dyno1 commented Apr 6, 2021

Resolved / Related Issues

Details of Changes
YourHome.Dispose() is now called on navigation. It is possible to modify the code for any page to be disposed on navigation however that's not the case here. The problem with disposing every page but YourHome is that any other page is being reused and in YourHome's case, the widgets are created on navigation.
This PR fixes the issue where widgets weren't being disposed on navigaion and in Bundles case, it fixes a memory leak.

Validation
How did you test these changes?

  • Built and ran the app
  • Tested the changes for accessibility

Copy link
Contributor

@lukeblevins lukeblevins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit overkill, considering we can just call Dispose() in YourHome's OnNavigatingFrom override. The code looks good, but I'm not sure if we need the FrameExtensions at all unless there's another reason for it.

@d2dyno1
Copy link
Member Author

d2dyno1 commented Apr 6, 2021

@duke7553 we could call a function similar to ICleanup.Clanup() on other views.

@yaira2 yaira2 requested a review from lukeblevins April 9, 2021 20:07
@yaira2
Copy link
Member

yaira2 commented Apr 25, 2021

@duke7553 Should we merge this?

@yaira2 yaira2 requested a review from tsvietOK May 2, 2021 20:31
@d2dyno1
Copy link
Member Author

d2dyno1 commented May 6, 2021

@yaichenbaum could you review this one? It's fixing a memory leak 👀

Copy link
Contributor

@cinqmilleans cinqmilleans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaichenbaum @d2dyno1 "using File.Extensions" is unused and useless in 2 files. "WidgetPage.xaml.cs" is better.

@yaira2 yaira2 requested review from gave92 and removed request for lukeblevins and tsvietOK May 9, 2021 01:43
Copy link
Contributor

@lukeblevins lukeblevins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever enough solution to call the Dispose() method, so I suppose

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels May 14, 2021
@yaira2 yaira2 merged commit a23aa99 into files-community:main May 14, 2021
@d2dyno1 d2dyno1 deleted the imp_cb3 branch May 15, 2021 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants