Skip to content

Separate unmanaged pointer lifecycle management into SafeHandles #586

@jmaeagle99

Description

@jmaeagle99

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions