Skip to content

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

Merged
Alexays merged 3 commits into
Alexays:masterfrom
RobertMueller2:issue_3981
Jun 22, 2025
Merged

Alexays merged 3 commits into
Alexays:masterfrom
RobertMueller2:issue_3981

Conversation

@RobertMueller2

@RobertMueller2 RobertMueller2 commented May 2, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

@RobertMueller2

RobertMueller2 commented May 3, 2025

Copy link
Copy Markdown
Contributor Author

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

3 participants