BUGFIX: fix massive memory leak in wf::pixdecor::pixdecor_theme_t::get_font_description()#51
Merged
soreau merged 3 commits intosoreau:masterfrom Sep 26, 2025
Merged
Conversation
…et_font_description()` Signed-off-by: kernaltrap <kernaltrap@gmail.com> A PangoFontDescription* object was being wrapped in a `unique_ptr` and not properly free'd. The pointer was free'd, but not the object. This fixes all of the visible leaks I can see in wayfire, other than leaks from `libgallium`.
soreau
requested changes
Sep 26, 2025
Owner
soreau
left a comment
There was a problem hiding this comment.
Looks good to me aside from one small thing.
Owner
|
LGTM, thanks! |
Contributor
Author
|
Yay! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: kernaltrap kernaltrap@gmail.com
A PangoFontDescription* object was being wrapped in a


unique_ptrand not properly free'd. The pointer was free'd, but not the object. This fixes all of the visible leaks I can see in wayfire, other than leaks fromlibgallium.For reference, this is Heaptrack before and after the patch:
Before:
After:
The first image is from a Heaptrack recorded over the course of 22 hours, the second is after 40 minutes or so. May not be super accurate, but I'm fairly certain this leak is gone because resizing windows did not cause any pixdecor functions to show up in Heaptrack.