sample: Fix leak in Scribble sample when resizing the window

This commit is contained in:
Bertrand Lorentz 2013-12-01 16:06:50 +01:00
parent bc309f3093
commit cf7aa5222e

View file

@ -90,6 +90,10 @@ namespace GtkSamples {
protected override bool OnConfigureEvent (EventConfigure ev)
{
if (surface != null) {
surface.Dispose ();
}
surface = ev.Window.CreateSimilarSurface (Cairo.Content.Color, AllocatedWidth, AllocatedHeight);
ClearSurface ();
return true;