편집

다음을 통해 공유


BaseWrapper Class

Definition

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
Inheritance
BaseWrapper
Implements

Remarks

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.

Constructors

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.

Properties

Handle

Handle (pointer) to the unmanaged object representation.

Methods

Dispose()

Releases the resources used by the BaseWrapper object.

Dispose(Boolean)

Releases the resources used by the BaseWrapper object.

Finalize()

Finalizer for the BaseWrapper object

Applies to