mirror of
https://github.com/MartinOpat/cuda-based-raytrace.git
synced 2025-06-07 02:13:10 +02:00
.
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user