Reduce allocations in GetLocale() (#25531)
authorIlya <darpa@yandex.ru>
Tue, 2 Jul 2019 12:54:03 +0000 (17:54 +0500)
committerJan Kotas <jkotas@microsoft.com>
Tue, 2 Jul 2019 12:54:03 +0000 (05:54 -0700)
src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs

index 8c60a92..92cd2b8 100644 (file)
@@ -545,7 +545,7 @@ namespace System.Reflection
             if (locale == null)
                 return CultureInfo.InvariantCulture;
 
-            return new CultureInfo(locale);
+            return CultureInfo.GetCultureInfo(locale);
         }
 
         [MethodImplAttribute(MethodImplOptions.InternalCall)]