From 4fec98839385136f768c8ea1ee265fcaa50d8cc9 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 8 Jun 2018 14:15:01 +0200 Subject: Correctly destory window --- src/glfw/window.cc | 4 ++++ src/glfw/window.h | 1 + 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/glfw/window.cc b/src/glfw/window.cc index 6fbbfee..0e57a65 100644 --- a/src/glfw/window.cc +++ b/src/glfw/window.cc @@ -11,6 +11,10 @@ Window::Window(const std::string& title): } } +Window::~Window() { + glfwDestroyWindow(_handle); +} + bool Window::isGood() const { return _good; } diff --git a/src/glfw/window.h b/src/glfw/window.h index 520b5e8..92a1b56 100644 --- a/src/glfw/window.h +++ b/src/glfw/window.h @@ -17,6 +17,7 @@ private: public: Window(const std::string& title); + ~Window(); bool isGood() const; -- cgit v1.2.3