From 37a7407886f51be926fd251f499e79d7d2b86894 Mon Sep 17 00:00:00 2001 From: Ilya Date: Tue, 2 Jul 2019 17:54:03 +0500 Subject: [PATCH] Reduce allocations in GetLocale() (dotnet/coreclr#25531) Commit migrated from https://github.com/dotnet/coreclr/commit/db90a795f5280ead19d5cc1780e9e25aad29fb8d --- .../src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs index 8c60a92..92cd2b8 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs @@ -545,7 +545,7 @@ namespace System.Reflection if (locale == null) return CultureInfo.InvariantCulture; - return new CultureInfo(locale); + return CultureInfo.GetCultureInfo(locale); } [MethodImplAttribute(MethodImplOptions.InternalCall)] -- 2.7.4