diff --git a/sample/Scribble.cs b/sample/Scribble.cs index 260bb4c03..d942acae7 100644 --- a/sample/Scribble.cs +++ b/sample/Scribble.cs @@ -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;