Fix some memory leaks in a few of the tests.

This commit is contained in:
Carl Worth 2006-08-08 12:48:56 -07:00
parent d6e204b9d5
commit ca99478d43
4 changed files with 8 additions and 0 deletions

View file

@ -109,6 +109,8 @@ draw (cairo_t *cr, int width, int height)
}
}
cairo_pattern_destroy (gradient);
return CAIRO_TEST_SUCCESS;
}

View file

@ -61,6 +61,8 @@ draw (cairo_t *cr, int width, int height)
cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_GRAY);
cairo_set_font_options (cr, font_options);
cairo_font_options_destroy (font_options);
cairo_set_source_rgb (cr, 0, 0, 0); /* black */
cairo_text_extents (cr, black, &extents);
cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);

View file

@ -61,6 +61,8 @@ draw (cairo_t *cr, int width, int height)
cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_NONE);
cairo_set_font_options (cr, font_options);
cairo_font_options_destroy (font_options);
cairo_set_source_rgb (cr, 0, 0, 0); /* black */
cairo_text_extents (cr, black, &extents);
cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);

View file

@ -90,6 +90,8 @@ draw (cairo_t *cr, int width, int height)
for (i=0; i < REPS; i++)
cairo_paint (cr);
cairo_surface_destroy (surface);
return CAIRO_TEST_SUCCESS;
}