mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 05:23:24 -07:00
Fixed some errors, removed obsolete code, removed some anonymous delegates and added some additional disposing code in the CaptureHelper.cs
This commit is contained in:
parent
15253ef295
commit
be36a3f42b
11 changed files with 211 additions and 1791 deletions
|
@ -121,7 +121,7 @@ namespace Greenshot {
|
|||
/// <summary>
|
||||
/// Cleanup all the allocated resources
|
||||
/// </summary>
|
||||
private void Cleanup() {
|
||||
private void Cleanup(object sender, EventArgs e) {
|
||||
if (gBitmap != null) {
|
||||
gBitmap.Dispose();
|
||||
gBitmap = null;
|
||||
|
@ -133,12 +133,8 @@ namespace Greenshot {
|
|||
/// </summary>
|
||||
public AboutForm() {
|
||||
// Make sure our resources are removed again.
|
||||
Disposed += delegate {
|
||||
Cleanup();
|
||||
};
|
||||
FormClosing += delegate {
|
||||
Cleanup();
|
||||
};
|
||||
Disposed += Cleanup;
|
||||
FormClosing += 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue