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
This commit is contained in:
RKrom 2013-02-12 21:17:28 +00:00
commit 157cace477

View file

@ -117,10 +117,23 @@ namespace Greenshot {
// The order in which we draw the dots & flow the collors.
List<int> flowOrder = new List<int>() { 4, 3, 2, 1, 0, 5, 6, 7, 8, 9, 10, 14, 15, 18, 19, 20, 21, 22, 23, 16, 17, 13, 12, 11 };
/// <summary>
/// Cleanup all the allocated resources
/// </summary>
private void Cleanup() {
if (gBitmap != null) {
gBitmap.Dispose();
gBitmap = null;
}
}
/// <summary>
/// Constructor
/// </summary>
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;
//