NSObject.MarkDirty Method

Definition

Promotes a regular peer object (IsDirectBinding is true) into a toggleref object.

protected void MarkDirty();
member this.MarkDirty : unit -> unit

Remarks

This turns a regular peer object (one that has IsDirectBinding set to true) into a toggleref object. This is necessary when storing managed state (for instance into a backing field), so that the managed peer isn't collected by the GC before the native object is freed. This is an internal method.

Applies to