examples: Destroy the cairo context after usage

This commit is contained in:
Sebastian Dröge 2010-07-24 10:29:01 +02:00
parent d1754f05c4
commit a978c1a03d
3 changed files with 6 additions and 0 deletions

View file

@ -95,6 +95,8 @@ draw_spectrum (gfloat * data)
cairo_rectangle (cr, i, -data[i], 1, spect_height + data[i]);
cairo_fill (cr);
}
cairo_destroy (cr);
gdk_window_end_paint (gtk_widget_get_window (drawingarea));
}

View file

@ -94,6 +94,8 @@ draw_spectrum (gfloat * data)
cairo_rectangle (cr, i, -data[i], 1, spect_height + data[i]);
cairo_fill (cr);
}
cairo_destroy (cr);
gdk_window_end_paint (gtk_widget_get_window (drawingarea));
}

View file

@ -83,6 +83,8 @@ draw_spectrum (gfloat * data)
cairo_rectangle (cr, i, -data[i], 1, spect_height + data[i]);
cairo_fill (cr);
}
cairo_destroy (cr);
gdk_window_end_paint (gtk_widget_get_window (drawingarea));
}