diff --git a/UI/CaptureView.cs b/UI/CaptureView.cs --- a/UI/CaptureView.cs +++ b/UI/CaptureView.cs @@ -257,6 +257,8 @@ namespace DesertPaintLab DesertPaintLab.AppSettings.Get("DebugScreenshot", out debugScreenshot); Gdk.Image rootImage = rootWindow.GetImage(0, 0, screenWidth, screenHeight); screenBuffer.GetFromImage(rootImage, rootImage.Colormap, 0, 0, 0, 0, screenWidth, screenHeight); + rootImage.Unref(); + System.GC.Collect(); // really, clean up now //screenBuffer.GetFromDrawable(rootWindow, // rootWindow.Colormap, 0, 0, 0, 0, screenWidth, screenHeight); int stride = screenBuffer.Rowstride;