mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 05:23:24 -07:00
Disposing matrix in the new code, otherwise it would cause memory leaks
This commit is contained in:
parent
4d6bf9f1ad
commit
4b8ec88aaf
3 changed files with 10 additions and 4 deletions
|
@ -879,6 +879,9 @@ namespace Greenshot.Drawing {
|
|||
if (_surfaceSizeChanged != null && !imageRectangle.Equals(new Rectangle(Point.Empty, newImage.Size))) {
|
||||
_surfaceSizeChanged(this, null);
|
||||
}
|
||||
} else {
|
||||
// clean up matrix, as it hasn't been used in the undo stack.
|
||||
matrix.Dispose();
|
||||
}
|
||||
} finally {
|
||||
// Always close the background form
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue