BaseWrapper BaseWrapper Class


Base class used by the bindinge generator to generate Protocol Wrapper Types.

public abstract class BaseWrapper : IDisposable, ObjCRuntime.INativeObject
type BaseWrapper = class
    interface INativeObject
    interface IDisposable


This class is intended to support the binding generator, and contains some of the common idioms and patterns used for implementing a managed object that wraps an unmanaged Objective-C object.

The class provides a constructor that take a native handle, and a flag indicating whether the underlying object has already been retained by managed code or not as well as implementing the IDisposable interface which will invoke the Objective-C release method on the target when the object is no longer referenced by managed code.


BaseWrapper(IntPtr, Boolean) BaseWrapper(IntPtr, Boolean)

Base wrapper constructor, takes both a handle to an unmanaged Objective-C object, and a boolean indicating the ownership of the object.


Handle Handle

Handle (pointer) to the unmanaged object representation.


Dispose() Dispose()

Releases the resources used by the BaseWrapper object.

Dispose(Boolean) Dispose(Boolean)

Releases the resources used by the BaseWrapper object.

Finalize() Finalize()

Finalizer for the BaseWrapper object

Applies to