Fix GDI handle leak in Icon.DrawImage (#47836)
authorSantiago Fernandez Madero <safern@microsoft.com>
Mon, 8 Feb 2021 20:44:58 +0000 (12:44 -0800)
committerGitHub <noreply@github.com>
Mon, 8 Feb 2021 20:44:58 +0000 (12:44 -0800)
commitb8db68c52d817b2cb0bff30c0f43eb47901c5d2f
tree6330cc8255d5e544176d011630d17f3de69749ee
parent744f1ffe5557442c802f75161e5bb05642913a9d
Fix GDI handle leak in Icon.DrawImage (#47836)

* Fix GDI handle leak in Icon.DrawImage

* Fix build

* Add test

* Fix test in Mono

* Add missing Usings
src/libraries/Common/src/Interop/Windows/Gdi32/Interop.SelectClipRgn.cs
src/libraries/Common/tests/System/Drawing/Helpers.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Icon.Windows.cs
src/libraries/System.Drawing.Common/tests/GdiPlusHandlesTests.cs [new file with mode: 0644]
src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj