An NDoc Documented Class Library

HandleCollector.Add Method 

Adds the given handle to the handle collector. The handle is added to the Forms sealed HandleCollector class so as to consolidate handle tracking between an external class and the internals within that namespace. The garbage collector will automatically determine when/if the handles need to be collected.

public static IntPtr Add(
   IntPtr handle,
   RegisteredHandleType type
);

Parameters

handle
A IntPtr referencing a handle of the specified type
type
A HandleCollector.RegisteredHandleType representing the type of the handle

Return Value

The handle that was passed into the Add method

Exceptions

Exception TypeCondition
HandleTypeNotRegisteredExceptionOccurs when the specified type has not been registered

See Also

HandleCollector Class | HandleCollector Members | Genghis.Windows.Forms Namespace