Skip to content

Commit f2203d9

Browse files
committed
Remove redundant static fields to reduce memory usage
1 parent 53a0981 commit f2203d9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeInvoker.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ namespace System.Xaml.Schema
1515
public class XamlTypeInvoker
1616
{
1717
private static XamlTypeInvoker s_Unknown;
18-
private static object[] s_emptyObjectArray = Array.Empty<object>();
1918

2019
private Dictionary<XamlType, MethodInfo> _addMethods;
2120
internal MethodInfo EnumeratorMethod { get; set; }
@@ -226,7 +225,7 @@ public virtual IEnumerator GetItems(object instance)
226225
throw new NotSupportedException(SR.Get(SRID.OnlySupportedOnCollectionsAndDictionaries));
227226
}
228227
MethodInfo getEnumMethod = GetEnumeratorMethod();
229-
return (IEnumerator)SafeReflectionInvoker.InvokeMethod(getEnumMethod, instance, s_emptyObjectArray);
228+
return (IEnumerator)SafeReflectionInvoker.InvokeMethod(getEnumMethod, instance, Array.Empty<object>());
230229
}
231230

232231
// vvvvv---- Unused members. Servicing policy is to retain these anyway. -----vvvvv

0 commit comments

Comments
 (0)