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

backend: gl: don't leak gl resources #1183

Merged
merged 1 commit into from
Feb 8, 2024
Merged

backend: gl: don't leak gl resources #1183

merged 1 commit into from
Feb 8, 2024

Conversation

yshui
Copy link
Owner

@yshui yshui commented Feb 6, 2024

Merge after #1179

@yshui
Copy link
Owner Author

yshui commented Feb 6, 2024

glXDestroyContext should free everything anyway, but it's still a good thing to do

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a39cd94) 36.56% compared to head (f265e04) 36.48%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1183      +/-   ##
==========================================
- Coverage   36.56%   36.48%   -0.09%     
==========================================
  Files          50       50              
  Lines       11543    11555      +12     
==========================================
- Hits         4221     4216       -5     
- Misses       7322     7339      +17     
Files Coverage Δ
src/backend/gl/gl_common.c 26.23% <91.66%> (+0.96%) ⬆️

... and 2 files with indirect coverage changes

Copy link
Collaborator

@absolutelynothelix absolutelynothelix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, builds and works for me.

not sure how to make sure that you didn't miss anything but i ran apitrace leaks on a trace generated by picom --config=/dev/null --backend=glx with this pull request applied and it didn't report any leaks. though it doesn't check if the amount of the glCreateProgram/glDeleteProgram and the glGenQueries/glDeleteQueries calls match i checked it manually and it perfectly matches. additionaly, the amount of the glCreateShader/glDeleteShader calls also perfectly matches.


glDeleteTextures(1, &gd->default_mask_texture);
glDeleteTextures(1, &gd->back_texture);

glDeleteQueries(2, gd->frame_timing);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally 😄

@yshui yshui merged commit 0f22b70 into next Feb 8, 2024
17 checks passed
@yshui yshui deleted the gl-leak branch February 8, 2024 23:43
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.

2 participants