diff options
author | Carl Worth <cworth@cworth.org> | 2005-07-14 16:18:39 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-07-14 16:18:39 +0000 |
commit | 40edca337e3976ddca98caafcbab950000e66880 (patch) | |
tree | 641f67a4d87ae2fde38f3ee2faacf09548b2b529 /test/trap-clip.c | |
parent | d8500060a972de9ca0f202d9cfb73460446dfc17 (diff) |
Rewrite to use cairo_image_surface_create_from_png rather than custom read_png_argb32. In addition to being simpler, this eliminates the leak of the image data buffer.
Add calls to cairo_pattern_destroy to close two memory leaks.
Diffstat (limited to 'test/trap-clip.c')
-rw-r--r-- | test/trap-clip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/trap-clip.c b/test/trap-clip.c index 2ad43ea5f..dddb94cb2 100644 --- a/test/trap-clip.c +++ b/test/trap-clip.c @@ -55,6 +55,7 @@ set_gradient_pattern (cairo_t *cr, int x, int y) cairo_pattern_add_color_stop_rgba (pattern, 0, 1, 1, 1, 1); cairo_pattern_add_color_stop_rgba (pattern, 1, 0, 0, 0.4, 1); cairo_set_source (cr, pattern); + cairo_pattern_destroy (pattern); } static void @@ -64,6 +65,7 @@ set_image_pattern (cairo_t *cr, int x, int y) pattern = cairo_test_create_png_pattern (cr, png_filename); cairo_set_source (cr, pattern); + cairo_pattern_destroy (pattern); } static void |