Skip to content

Issue 3981: try and fix memory leak in privacy module #4092

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

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

Conversation

RobertMueller2
Copy link
Contributor

@RobertMueller2 RobertMueller2 commented May 2, 2025

Closes #3981

As I'm mostly dealing with languages with automatic memory management, I'm not an expert on this. :p But I think update_tooltip creates objects with every update and at least doesn't get rid of the childrens' children.

Attempt to address this by using make_managed instead of new objects.

I've tested it and at least with my limited test it worked, can't see the reported memory leak with heaptrack anymore, either.

@JassonCordones
Copy link

Apparently you forgot to apply the clang-format to the file.

@RobertMueller2
Copy link
Contributor Author

RobertMueller2 commented May 3, 2025

That's not correct. I did run it on the file, I even still have it in history. 😛

clang-format-19 -i --style="{BasedOnStyle: Google, AlignConsecutiveDeclarations: false, ColumnLimit: 100}" src/modules/privacy/privacy_item.cpp

I just didn't run it on everything else, which has been broken for a while.

If you check the details of the failed check, it failed for src/modules/sway/workspaces.cpp, which I haven't edited here.

@RobertMueller2 RobertMueller2 marked this pull request as draft May 3, 2025 07:26
@RobertMueller2 RobertMueller2 marked this pull request as ready for review May 3, 2025 09:30
@RobertMueller2 RobertMueller2 mentioned this pull request May 3, 2025
42 tasks
@RobertMueller2 RobertMueller2 changed the title Issue 3981: try and fix memory leak Issue 3981: try and fix memory leak in privacy module May 3, 2025
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.

Massive Memory leak in privacy module
2 participants