-
Notifications
You must be signed in to change notification settings - Fork 635
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
Reduce Dynamo ViewModel memory leak Part I #9993
Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
19ce1b0
Initial Commit, example to remove HomeWorkspaceViewModel leak on RunS…
QilongTang fdbe3fe
Update baseclass for RunSettingsViewModel
QilongTang 7a41ce8
Dispose WorkspaceDependencyView using Dispose call
QilongTang 9d4b0b6
Remove property no longer needed
QilongTang 305159f
Update base class
QilongTang 21b99fa
Merge branch 'master' into DynamoMemoryLeak
QilongTang dab24bb
Merge branch 'master' into DynamoMemoryLeak
QilongTang 81d2bcc
Address memory leak on notifications property
QilongTang 278b2f5
Some improvement on eventhandlers leak
QilongTang 412bd54
Code Clean up
QilongTang d82618a
Merge branch 'master' into DynamoMemoryLeak
QilongTang e13ca60
Code Clean Up
QilongTang 5937131
Use Auto property
QilongTang b3bd3ab
Code Clean up
QilongTang c9b1d3a
Update SearchViewModel Dispose function to start from all roots
QilongTang 338291e
Obsolete SearchViewModel initialization on DynamoViewModel
QilongTang 7aca3f3
Dispose InfoBuubleView and workspaceView correctly
QilongTang b71a0ac
Some Code CleanUp
QilongTang 5f09381
Dispose temp root cates correctly
QilongTang 30134c0
Regressions
QilongTang 259123c
regression none sense :)
QilongTang 4a1bdf4
comments
QilongTang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the cases where this needs to be done in c# are small in number, why do we need to do it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe something here is preventing HomeworkspaceViewModel to be disposed, not sure if it is related to the readonly field or simply calling dispose, will give it another try tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the retention paths you captured screenshots of it looks like the
DynamoView
is indirectly holding onto an instance ofRunSettingsViewModel
that is in turn holding onto theHomeWorkspaceViewModel
. I think we should try and dispose off theHomeWorkspaceViewModel
fromDynamoView
in that case, no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe DynamoView is a singleton as well as the RunSettingsControl. So we won't be able to know when to dispose specifically from the view, but we can do that when closing the currentWorkspace. WorkspaceRemoved event will be triggered and then Dispose() on HomeWorkspaceModel will be called, that's why I added the logic there.