Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs')
-rw-r--r--src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs
index cbd6108ea4c..c2cb899e115 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs
@@ -109,7 +109,11 @@ namespace System.Runtime.InteropServices.ObjectiveC
ArgumentNullException.ThrowIfNull(obj);
IntPtr refCountHandle = CreateReferenceTrackingHandleInternal(
+#if NATIVEAOT
+ obj,
+#else
ObjectHandleOnStack.Create(ref obj),
+#endif
out int memInSizeT,
out IntPtr mem);