diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp index 7b878467f..7495b47a2 100644 --- a/include/SFML/Graphics/RenderWindow.hpp +++ b/include/SFML/Graphics/RenderWindow.hpp @@ -96,14 +96,6 @@ public: //////////////////////////////////////////////////////////// explicit RenderWindow(WindowHandle handle, const ContextSettings& settings = ContextSettings()); - //////////////////////////////////////////////////////////// - /// \brief Destructor - /// - /// Closes the window and frees all the resources attached to it. - /// - //////////////////////////////////////////////////////////// - ~RenderWindow() override; - //////////////////////////////////////////////////////////// /// \brief Get the size of the rendering region of the window /// diff --git a/src/SFML/Graphics/RenderWindow.cpp b/src/SFML/Graphics/RenderWindow.cpp index acbdb56c3..2b232d824 100644 --- a/src/SFML/Graphics/RenderWindow.cpp +++ b/src/SFML/Graphics/RenderWindow.cpp @@ -52,10 +52,6 @@ RenderWindow::RenderWindow(WindowHandle handle, const ContextSettings& settings) } -//////////////////////////////////////////////////////////// -RenderWindow::~RenderWindow() = default; - - //////////////////////////////////////////////////////////// Vector2u RenderWindow::getSize() const { diff --git a/test/Graphics/RenderWindow.test.cpp b/test/Graphics/RenderWindow.test.cpp index 5d76f626a..d502761a1 100644 --- a/test/Graphics/RenderWindow.test.cpp +++ b/test/Graphics/RenderWindow.test.cpp @@ -17,6 +17,7 @@ TEST_CASE("[Graphics] sf::RenderWindow", runDisplayTests()) { SECTION("Type traits") { + STATIC_CHECK(std::has_virtual_destructor_v); STATIC_CHECK(!std::is_copy_constructible_v); STATIC_CHECK(!std::is_copy_assignable_v); STATIC_CHECK(!std::is_nothrow_move_constructible_v);