NSObject.MarkDirty Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.