mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-22 12:25:38 +02:00
bar: call cairo_device_finish() on the surface's device
This fixes lots of memory leaks detected by valgrind. Unsure if this is how you're supposed to shutdown cairo. You'd think (from the documentation) that destroying the surface would (when the refcount reaches 0) destroy the device too...
This commit is contained in:
parent
b2c9c386d9
commit
8dfe4af76b
1 changed files with 2 additions and 0 deletions
2
bar.c
2
bar.c
|
@ -702,6 +702,8 @@ run(struct bar_run_context *run_ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_destroy(bar->cairo);
|
cairo_destroy(bar->cairo);
|
||||||
|
cairo_device_finish(cairo_surface_get_device(bar->cairo_surface));
|
||||||
|
cairo_surface_finish(bar->cairo_surface);
|
||||||
cairo_surface_destroy(bar->cairo_surface);
|
cairo_surface_destroy(bar->cairo_surface);
|
||||||
cairo_debug_reset_static_data();
|
cairo_debug_reset_static_data();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue