Skip to content

Make Vulkan Pfn* structs disposable to avoid memory leaks #614

@Perksey

Description

@Perksey

BuildTools-generated Pfn* structures implement IDisposable so that SilkMarshal.Free can be called to unpin the delegate and allow the GC to have at it. The Vulkan Pfn* structures, which are manually written, do not implement this at the moment and cause (very minor) memory leaks.

The work is:

  • look at how the Pfn* structures in one of the other libraries (for example SDL) does it
  • make the Pfn* structures in Vulkan inherit from IDisposable
  • implement it
  • optionally check OpenXR (and maybe OpenGL) as well

Community contributions welcome.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions