From ba01c8bada59813044dac4b5efbcfaef17388c87 Mon Sep 17 00:00:00 2001 From: lindexi Date: Wed, 3 Jun 2020 19:31:43 +0800 Subject: [PATCH] Reduce memory usage --- .../src/System.Xaml/System/Windows/Markup/ValueSerializer.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs index 78e2fcb56c5..75934717af3 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializer.cs @@ -92,8 +92,6 @@ public virtual object ConvertFromString(string value, IValueSerializerContext co throw GetConvertFromException(value); } - static List Empty = new List(); - /// /// Returns an enumeration of the types referenced by the value serializer. If the value serializer asks for /// a value serializer for System.Type, any types it asks to convert should be supplied in the returned @@ -110,7 +108,7 @@ public virtual object ConvertFromString(string value, IValueSerializerContext co /// An enumeration of the types converted by this serializer public virtual IEnumerable TypeReferences(object value, IValueSerializerContext context) { - return Empty; + return Array.Empty(); } ///