| SafeHandle |
| Name | Description |
|---|---|
IsClosed (get) | Indicates if the SafeHandle is considered closed. |
IsInvalid (get) | Indicates if the wrapped handle is considered invalid. |
| Name | Description |
|---|---|
CloseHandle | Attempts to close the handle by raising the ReleaseHandle event. |
DangerousGetHandle | Returns the wrapped handle. |
| Name | Description |
|---|---|
ReleaseHandle |
This class should be implemented using the Implements keyword for usage within the system.
The class also manages the lifetime of a given handle. It should be used within a custom safe-handle implementation and handle the ReleaseHandle event to peform clean-up for the specific handle in implementations.
An example of implementing and using SafeHandle is SafeFileHandle.