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/sid memleaks #2120

Merged
merged 2 commits into from
May 20, 2024
Merged

Fix/sid memleaks #2120

merged 2 commits into from
May 20, 2024

Conversation

dforsi
Copy link
Contributor

@dforsi dforsi commented May 19, 2024

This PR deletes some objects and removes some disconnect() that shouldn't be needed since all the objects that would receive the signals are destroyed.

Should I use deleteLater() instead?

Fixes leaks:
in SIDGUI::SIDGUI(PluginAPI*, FeatureUISet*, Feature*, QWidget*) plugins/feature/sid/sidgui.cpp:257
in SIDGUI::SIDGUI(PluginAPI*, FeatureUISet*, Feature*, QWidget*) plugins/feature/sid/sidgui.cpp:249
in SIDGUI::SIDGUI(PluginAPI*, FeatureUISet*, Feature*, QWidget*) plugins/feature/sid/sidgui.cpp:215
Signals are automatically disconnected when QObjects are destroyed:
https://doc.qt.io/qt-5/qobject.html#dtor.QObject
@srcejon
Copy link
Collaborator

srcejon commented May 19, 2024

Should I use deleteLater() instead?

I think delete should be fine, thanks.

@f4exb f4exb merged commit 0714e5d into f4exb:master May 20, 2024
2 of 3 checks passed
@dforsi dforsi deleted the fix/sid-memleaks branch May 21, 2024 17:59
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.

3 participants