From 157cace47792603f8fa0b14623bccf85fd68b258 Mon Sep 17 00:00:00 2001 From: RKrom Date: Tue, 12 Feb 2013 21:17:28 +0000 Subject: [PATCH] Disposing the "G" bitmap of the AboutForm git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2482 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Forms/AboutForm.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Greenshot/Forms/AboutForm.cs b/Greenshot/Forms/AboutForm.cs index 416c3220a..aa3a40476 100644 --- a/Greenshot/Forms/AboutForm.cs +++ b/Greenshot/Forms/AboutForm.cs @@ -117,10 +117,23 @@ namespace Greenshot { // The order in which we draw the dots & flow the collors. List flowOrder = new List() { 4, 3, 2, 1, 0, 5, 6, 7, 8, 9, 10, 14, 15, 18, 19, 20, 21, 22, 23, 16, 17, 13, 12, 11 }; + /// + /// Cleanup all the allocated resources + /// + private void Cleanup() { + if (gBitmap != null) { + gBitmap.Dispose(); + gBitmap = null; + } + } + /// /// Constructor /// public AboutForm() { + // Make sure our resources are removed again. + this.Disposed += delegate { Cleanup(); }; + // Enable animation for this form, when we don't set this the timer doesn't start as soon as the form is loaded. EnableAnimation = true; //