private static bool CheckEnableAutoreleasePool()
{
const string feature = "System.Threading.Thread.EnableAutoreleasePool";
#if !CORECLR
return AppContextConfigHelper.GetBooleanConfig(feature, false);
#else
bool isEnabled = CLRConfig.GetBoolValue(feature, out bool isSet);
if (!isSet)
return false;
return isEnabled;
#endif
}