I am writing some code to wrap some GLFW objects.
I have a private shared_ptr<GLFWwindow>
field on my class. GLFW has methods such as glfwDestroyWindow
, which I use as glfwDestroyWindow(_windowPtr.get())
, since the library is a C library.
I am curious if there is a way to call glfwDestroyWindow
whenever the pointer is unassigned (specifically, just before it happens). Can this be done?