logoalt Hacker News

delta_p_delta_x • today at 5:05 PM • 0 replies • view on HN

> but they were all really just void* renamed

The good thing is that all of these can and have been quite neatly put into RAII[1] or some memory arena with custom deleters which use the Win32 functions. One could manually `delete` those handles, but there be dragons. Vulkan does something similar; everything is a VkSomething handle. They may just be pointers directly exposed by the driver, but even so, users are explicitly supposed to use vkDeleteSomething functions to delete them.

[1]: https://github.com/microsoft/wil