mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -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
|
@ -303,7 +303,9 @@ namespace GreenshotPlugin.Core {
|
|||
Image tmpImage;
|
||||
if (outputSettings.Effects != null && outputSettings.Effects.Count > 0) {
|
||||
// apply effects, if there are any
|
||||
tmpImage = ImageHelper.ApplyEffects(imageToSave, outputSettings.Effects, new Matrix());
|
||||
using (Matrix matrix = new Matrix()) {
|
||||
tmpImage = ImageHelper.ApplyEffects(imageToSave, outputSettings.Effects, matrix);
|
||||
}
|
||||
if (tmpImage != null) {
|
||||
if (disposeImage) {
|
||||
imageToSave.Dispose();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue