From 40044fc3ba77e04168c5ba99880fd6f857a9c754 Mon Sep 17 00:00:00 2001 From: Aleksey Kliger Date: Fri, 2 Oct 2020 14:28:43 -0400 Subject: [PATCH] [System.Drawing.Common] In test, dispose of Metafile after Graphics Fixes https://github.com/dotnet/runtime/issues/37838 Verified using libgdiplus built with https://github.com/mono/libgdiplus/pull/671 --- .../tests/mono/System.Imaging/MetafileTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Drawing.Common/tests/mono/System.Imaging/MetafileTest.cs b/src/libraries/System.Drawing.Common/tests/mono/System.Imaging/MetafileTest.cs index a50622aa57eddb..f7c7f195dbb35e 100644 --- a/src/libraries/System.Drawing.Common/tests/mono/System.Imaging/MetafileTest.cs +++ b/src/libraries/System.Drawing.Common/tests/mono/System.Imaging/MetafileTest.cs @@ -408,8 +408,8 @@ public void Measure() RectangleF rect = new RectangleF(0, 0, size.Width, size.Height); Region[] region = g.MeasureCharacterRanges(text, test_font, rect, sf); Assert.Equal(2, region.Length); - mf.Dispose(); } + mf.Dispose(); } [ConditionalFact(Helpers.IsDrawingSupported)]