Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Consider inheriting from SafeHandle in LlvmBindings native handle wrappers #1324

Open
@swernli

Description

@swernli

Several classes in LlvmBindings act as wrappers around native handles that need to be cleaned up by specific native calls on dispose of their wrappers. To get predictable behavior for closing the native handles on exceptions and the like, it is usually recommended to inherit from the SafeHandle class and use it's patterns for management of handles. While the existing manual dispose pattern hasn't caused any problems yet (and matches the code in LLVMSharp we copied this from), it would be good to follow the language recommendation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: code gen (QIR)QIR code generationenhancementNew request or suggestion for an improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions