diff options
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.cs | 4 |
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); |