-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The struct x11rb::cursor::Handle contained a cursor_font resource. This resource was never freed, so basically leaked. It's "just a font" and it is unlikely to cause a problem, but I want to deal with it anyway. One option would be to add a Drop implementation, but that would make everything more complicated since the Drop implementation would need access to the X11 connection. So, this basically requires an API break. In this commit, I go with the other option: Instead of keeping the core font open all the time, it is now only opened when needed and then immediately closed again. Since this is dealing with a font leak already, I am also changing the code from using a plain "Font" to the "FontWrapper" struct that cleans up the font in its Drop implementation. Signed-off-by: Uli Schlachter <[email protected]>
- Loading branch information
Showing
1 changed file
with
5 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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