Share via


Runtime.RetainAndAutoreleaseNativeObject(INativeObject) Method

Definition

Retain and autorelease the given object, then return the object's handle.

public static ObjCRuntime.NativeHandle RetainAndAutoreleaseNativeObject(ObjCRuntime.INativeObject? obj);
static member RetainAndAutoreleaseNativeObject : ObjCRuntime.INativeObject -> ObjCRuntime.NativeHandle

Parameters

obj
INativeObject

The object to retain and autorelease.

Returns

The object's handle (retained and autorelease).

Remarks

If the given object is not an NSObject, then the handle won't be retained/autoreleased.

Applies to