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

FIX: Ensure previous instance of display class is fully cleaned up after reloading it #1209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jbellister-slac
Copy link
Collaborator

Context

Fixes #1114

As suspected in #1114, the previous instance of the Display class was not getting garbage collected when using reload display. Checking what still had references to it after a reload showed that it was only the PyDMMainWindow.home_widget which still had a reference to it.

Fix is to clear that out during the reload. The home widget will get correctly set to the refreshed version of the display later on as part of the reload process so the home button continues to work fine after this change.

Testing

Verified that the test display from #1114 now only ticks once per second after reloading when applying this fix. Added a unit test that catches this issue, fails prior to this fix, and passes after.

@nstelter-slac nstelter-slac self-requested a review March 24, 2025 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After using "Reload Display" (Ctrl+R), the previous instance of the Display class is not deleted.
2 participants