This commit is contained in:
2025-01-11 15:46:59 +01:00
parent 6fdfee571a
commit e74d1ef3ba

View File

@@ -78,13 +78,12 @@ int Window::init_quad(float* data) {
void Window::free(float* data) { void Window::free(float* data) {
// To preserve the proper destruction order we forcefully set the quads to null (calling their destructor in the process) // To preserve the proper destruction order we forcefully set pointers to null (calling their destructor in the process)
// Not strictly necessary, but i saw some weird errors on exit without this so best to keep it in. // Not strictly necessary, but i saw some weird errors on exit without this so best to keep it in.
this->quad = nullptr; this->quad = nullptr;
this->widget = nullptr; this->widget = nullptr;
cudaFree(data); cudaFree(data);
glfwDestroyWindow(window); glfwDestroyWindow(window);
glfwTerminate(); glfwTerminate();
} }