Edit

Share via


ArgumentSemantic Enum

Definition

Represents the assignment semantics for properties.

public enum ArgumentSemantic
type ArgumentSemantic = 
Inheritance
ArgumentSemantic

Fields

Name Value Description
None -1

No argument semantics is specified.

Assign 0

Assigning is merely a pointer copy. This is identical to UnsafeUnretained

UnsafeUnretained 0

Merely performs a pointer copy in unmanaged code. This is identical to Assign.

Copy 1

A copy of the object is made.

Retain 2

The assigned object is retained (its reference count increased). This is identical to Strong.

Strong 2

The assigned object is retained (its reference count increased). This is identical to Retain.

Weak 3

A weak reference is created to the assigned object, and the property will automatically be nulled out when the assigned object is freed.

Remarks

This is used to flag the behavior of properties when objects are assigned, these are used by the Xamarin.iOS / Xamarin.Mac runtime to properly track used objects and to garbage collect them when they are no longer required.

Applies to