Closing a WindowBase

We attempted to make (a small part of) our own framework where cameras and windows could be created and shut down with ease for the Drive

We took the example code from camera_sample_gmsl , and got it to work decently alright.

However, when we attempt to close the Window (an unique pointer to WindowBase) by clicking the “x” on the window, it does not close properly. We have not found the correct way in code to close such a window. We’re able to stop the incoming stream, and free up almost everything, but the window will remain open in a frozen position. After some time, the OS will indicate that our window is not responding as well.

Herewith the question; how do we properly close a WindowBase in code, so it doesnt linger on screen in this status?

In the sample it got closed by shutting down the entirety of driveworks, which is not something we wanted to do, as we simply wanted to close the window, and keep everything else running.

Hi Rschiltkamp,

Do you observe the same issue with sample_camera_gmsl sample? Could you refer to below source or docs to see if help on your case? Thanks!


We’ve solved it by changing our WindowBase instance to an instance of WindowGLFW with a bit of trial and error using the glfw docs you provided.

After the change, we were able to call glfwDestroyWindow on our window->getGLFW() , which indeed has closed the window as we wanted it to happen

Thank you for the help!