Skip to content

Commit

Permalink
igl | Terminate GLFW after closing the window
Browse files Browse the repository at this point in the history
Summary:
Call `glfwTerminate()` after closing the window.

No need to call `glfwDestroyWindow()` explicitly as it is a part of `unique_ptr`.

Reviewed By: dmannemela

Differential Revision: D51318546

fbshipit-source-id: dd6f40e82a78fd6527633176c8192f960cefcc0e
  • Loading branch information
corporateshark authored and facebook-github-bot committed Nov 16, 2023
1 parent d384128 commit ec38c93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shell/windows/vulkan/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@ int main(int argc, char* argv[]) {
glfwPollEvents();
}

glfwDestroyWindow(vulkanWindow.get());
glfwTerminate();

// Explicitly destroy all objects before exiting in order to make sure that
// whatever else global destructors may there, will be called after these. One
// example is a graphics resource tracker in the client code, which otherwise
// would not be guaranteed to be called after the graphics resources release.
vulkanShellPlatform_ = nullptr;
vulkanSession_ = nullptr;
vulkanWindow = nullptr;

glfwTerminate();

return 0;
}

0 comments on commit ec38c93

Please sign in to comment.