#583 introduced separate SafeHandle implementations for the Client and Worker bridge implementations to allow the SafeHandles to be passed around and prevent use-after-free problems. This should be extended to the remaining classes that currently maintain the lifetime of unmanaged pointers.
- Pointer lifetime management should be exclusively maintained by
SafeHandle types for each unmanaged pointer type.
- Consumers of the unmanaged pointers should use the
Scope.Pointer method to add-ref on a SafeHandle, which will return the unmanaged pointer value.