-
Notifications
You must be signed in to change notification settings - Fork 668
fix most memory leaks from opening and closing Dynamo Splash Screen #14344
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
Conversation
| Close(); | ||
| viewModel.RequestClose -= SplashScreenRequestClose; | ||
| //viewModel?.Model.ShutDown(false); | ||
| //TODO ensure viewmodel is shutdown by view being disposed. |
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 I verified this, but I will double check - IMO there is no reason to shutdown the view model because what we really need to do is dispose the DynamoView which will shutdown the view model - but again - I will verify.
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.
@QilongTang I've verified that the close call on DynamoView will shutdown the model and view model under normal circumstances. When in testmode this is handled by the teardown logic of most test base classes. I think this change is safe.
PTAL.
|
|
…ynamoDS#14344) * fixing mem leaks in progress * fix test and remove todo
| DynamoViewModel.CurrentSpaceViewModel.Model.NodeAdded -= OnNodeAdded; | ||
| DynamoViewModel.Model.Logger.NotificationLogged -= OnNotificationLogged; | ||
| CurrentWorkspace.RequestPackageDependencies -= PythonDependencies.AddPythonPackageDependency; | ||
| if (LoadedParams != null) |
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.
Were there null reference exceptions being thrown with all these objects earlier?
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.
yes during shutdown directly from the splash screen being closed.
* fix most memory leaks from opening and closing Dynamo Splash Screen (#14344) * fixing mem leaks in progress * fix test and remove todo * attempt to fix dispose issue in docs browser view get rid of redudant try/catch cleanup log event in docs browser extension replace item produced lambda with named method fix broken dispose logic in nodeautocompletesearchcontrol - it was always hanging onto static event implement dispose on viewextensioncommandexec on dynamoviewmodel dispose, also dispose all workspaces - their remove methods are not called... fix entry added lambda in searchviewmodel dynamoview now disposes workspace view and node autocomplete search - TODO here. workspaceview implement idisposable and cleans up view model subscriptions direct manip extension was not cleaning up settings prop changed. graph meta data view was not cleaning up current workspace cleared event attempt to cleanup browser com refs... not sure this is helping * review comment
* fix most memory leaks from opening and closing Dynamo Splash Screen (#14344) * fixing mem leaks in progress * fix test and remove todo * 2.19.1 disable network traffic WIP (#14393) * cherry pick analytics issue (#13328) * update * update * null checking * update * Update CoreNodeModelWpfResources.Designer.cs Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> * Revert "cherry pick analytics issue (#13328)" This reverts commit 6f9761d. * cherry pick analytics issue (#13328) (#14085) * update * update * null checking * update * Update CoreNodeModelWpfResources.Designer.cs Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> * Disable net traffic (#14083) * disable net traffic example * Update PackageManagerViewExtension.cs * update * Update DynamoModel.cs * Update PackageManagerViewExtension.cs * Update PackageManagerViewExtension.cs --------- Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> * Update PreferencesViewModel.cs: crash due to null feature flags (#14087) * Update PreferencesViewModel.cs * Update PackageManagerViewExtensionTests.cs --------- Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> * changes * remove comment * comments and disable notifications --------- Co-authored-by: pinzart90 <46732933+pinzart90@users.noreply.github.com> Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> --------- Co-authored-by: pinzart90 <46732933+pinzart90@users.noreply.github.com> Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com>
* fix most memory leaks from opening and closing Dynamo Splash Screen (#14344) * fixing mem leaks in progress * fix test and remove todo * 2.19.1 disable network traffic WIP (#14393) * cherry pick analytics issue (#13328) * update * update * null checking * update * Update CoreNodeModelWpfResources.Designer.cs Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> * Revert "cherry pick analytics issue (#13328)" This reverts commit 6f9761d. * cherry pick analytics issue (#13328) (#14085) * update * update * null checking * update * Update CoreNodeModelWpfResources.Designer.cs Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> * Disable net traffic (#14083) * disable net traffic example * Update PackageManagerViewExtension.cs * update * Update DynamoModel.cs * Update PackageManagerViewExtension.cs * Update PackageManagerViewExtension.cs --------- Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> * Update PreferencesViewModel.cs: crash due to null feature flags (#14087) * Update PreferencesViewModel.cs * Update PackageManagerViewExtensionTests.cs --------- Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> * changes * remove comment * comments and disable notifications --------- Co-authored-by: pinzart90 <46732933+pinzart90@users.noreply.github.com> Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com> * add python tests * move project * revert --------- Co-authored-by: pinzart90 <46732933+pinzart90@users.noreply.github.com> Co-authored-by: pinzart <tiberiu.pinzariu@autodesk.com>
Purpose
Before this PR each time you opened Dynamo and closed the splash screen, > 10 megs would leak as well as an entire DynamoView and everything else in the tree.
This PR leaves only 1 extra DynamoView, I need to investigate the TODO before this is merged.
Will continue looking at more complex workflows when I have bandwidth.
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Fixes some memory leaks from repeatedly opening and closing Dynamo's splash screen
Reviewers