-
Notifications
You must be signed in to change notification settings - Fork 332
added dispose() on some dialogs (fix memory leaks) #6959
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
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.
Pull Request Overview
This PR adds dispose() calls via overriding cancelAction() in both dialog classes to ensure proper resource cleanup when a cancel action is triggered.
- Overrides cancelAction() in WeightDisplayDialog to call dispose().
- Overrides cancelAction() in CostDisplayDialog to call dispose().
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
megamek/src/megamek/client/ui/dialogs/WeightDisplayDialog.java | Added cancelAction() override that calls dispose() for proper resource cleanup. |
megamek/src/megamek/client/ui/dialogs/CostDisplayDialog.java | Added cancelAction() override that calls dispose() for proper resource cleanup. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6959 +/- ##
=========================================
Coverage 30.32% 30.33%
- Complexity 15859 15875 +16
=========================================
Files 2891 2891
Lines 283420 283434 +14
Branches 49329 49329
=========================================
+ Hits 85958 85986 +28
+ Misses 191837 191821 -16
- Partials 5625 5627 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@exeea @rjhancock This is marked "For New Dev Cycle"; does that mean targeted at 0.50.07? |
I'd prefer to see those in this release, since its memory leak related. |
I'm good with including it |
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.
Looks good to me!
This PR fixes few memory leaks.
Added dispose() calls to:
those are dialogs that are spawned every time, never reused.