Skip to content

Comments

Dispose Homepage on navigation#4472

Merged
yair100 merged 5 commits intofiles-community:mainfrom
d2dyno1:imp_cb3
May 14, 2021
Merged

Dispose Homepage on navigation#4472
yair100 merged 5 commits intofiles-community:mainfrom
d2dyno1:imp_cb3

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

@yair100 yair100 requested a review from lukeblevins April 6, 2021 14:14
@yair100 yair100 added the ready for review Pull requests that are ready for review label Apr 6, 2021
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.

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

yair100 commented Apr 25, 2021

@duke7553 Should we merge this?

@yair100 yair100 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.

@yair100 yair100 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

@yair100 yair100 added ready to merge Pull requests that are approved and ready to merge and removed ready for review Pull requests that are ready for review labels May 14, 2021
@yair100 yair100 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