Dispose Homepage on navigation#4472
Merged
yair100 merged 5 commits intofiles-community:mainfrom May 14, 2021
Merged
Conversation
lukeblevins
reviewed
Apr 6, 2021
Member
Author
|
@duke7553 we could call a function similar to |
Member
|
@duke7553 Should we merge this? |
Member
Author
|
@yaichenbaum could you review this one? It's fixing a memory leak 👀 |
cinqmilleans
suggested changes
May 8, 2021
Contributor
cinqmilleans
left a comment
There was a problem hiding this comment.
@yaichenbaum @d2dyno1 "using File.Extensions" is unused and useless in 2 files. "WidgetPage.xaml.cs" is better.
lukeblevins
approved these changes
May 14, 2021
Contributor
lukeblevins
left a comment
There was a problem hiding this comment.
Clever enough solution to call the Dispose() method, so I suppose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?