/// <summary>Creates a <see cref="NewReference"/> pointing to the same object</summary> public NewReference(BorrowedReference reference, bool canBeNull = false) { var address = canBeNull ? reference.DangerousGetAddressOrNull() : reference.DangerousGetAddress(); Runtime.XIncref(address); this.pointer = address; }
public NewReference(BorrowedReference reference, bool canBeNull = false) { var address = canBeNull ? reference.DangerousGetAddressOrNull() : reference.DangerousGetAddress(); #pragma warning disable CS0618 // Type or member is obsolete Runtime.XIncref(reference); #pragma warning restore CS0618 // Type or member is obsolete this.pointer = address; }
internal static bool IsInstanceOfManagedType(BorrowedReference ob) => IsInstanceOfManagedType(ob.DangerousGetAddressOrNull());