Skip to content

Commit a59e758

Browse files
author
Abi Bennet
authored
Merge pull request #36 from lindexi/master
Fix memory leak
2 parents 1eeb30a + 0b5483a commit a59e758

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dotnet/WPF/AcrylicEffect/AcrylicEffect/CompositionHostControl.xaml.cs

+3
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ async void LoadSurface(CompositionDrawingSurface surface, string path)
155155
var rect = new Windows.Foundation.Rect(0, 0, _rectWidth, _rectHeight);
156156
ds.DrawImage(bitmap, 0, 0, rect);
157157
}
158+
159+
stream.Dispose();
160+
bitmap.Dispose();
158161
}
159162

160163
IGraphicsEffect CreateAcrylicEffectGraph()

0 commit comments

Comments
 (0)