From 3c38f8ccd60911cd8827c16cd8d6fd14e5b75ee0 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Jul 2021 14:34:37 +0200 Subject: [PATCH] [dotnet] Enable autorelease pools for threadpools. Fixes #11750. (#12060) Fixes https://github.com/xamarin/xamarin-macios/issues/11750. --- dotnet/targets/Xamarin.Shared.Sdk.targets | 1 + runtime/runtime.m | 2 +- tests/monotouch-test/ObjCRuntime/RuntimeTest.cs | 3 --- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index 11d01c8c4fe5..86745895a19a 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -133,6 +133,7 @@ false true true + true false diff --git a/runtime/runtime.m b/runtime/runtime.m index 3b258ec245f7..ccbd684b8fa7 100644 --- a/runtime/runtime.m +++ b/runtime/runtime.m @@ -1349,7 +1349,7 @@ -(void) xamarinSetFlags: (enum XamarinGCHandleFlags) flags; if (main_bundle == NULL) xamarin_assertion_message ("Could not find the main bundle in the app ([NSBundle mainBundle] returned nil)"); -#if MONOMAC +#if TARGET_OS_MACCATALYST || TARGET_OS_OSX if (xamarin_launch_mode == XamarinLaunchModeEmbedded) { bundle_path = [[[NSBundle bundleForClass: [XamarinAssociatedObject class]] bundlePath] stringByAppendingPathComponent: @"Versions/Current"]; } else { diff --git a/tests/monotouch-test/ObjCRuntime/RuntimeTest.cs b/tests/monotouch-test/ObjCRuntime/RuntimeTest.cs index 903691a1ceb0..8c574a2bc8e4 100644 --- a/tests/monotouch-test/ObjCRuntime/RuntimeTest.cs +++ b/tests/monotouch-test/ObjCRuntime/RuntimeTest.cs @@ -456,9 +456,6 @@ public void GetINativeObjectTest () } [Test] -#if NET - [Ignore ("https://github.com/dotnet/runtime/issues/32543")] -#endif public void NSAutoreleasePoolInThreadPool () { var count = 100;