MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / cleanup

Method cleanup

code/09_shader_modules.cpp:118–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 }
117
118 void cleanup() {
119 for (auto imageView : swapChainImageViews) {
120 vkDestroyImageView(device, imageView, nullptr);
121 }
122
123 vkDestroySwapchainKHR(device, swapChain, nullptr);
124 vkDestroyDevice(device, nullptr);
125
126 if (enableValidationLayers) {
127 DestroyDebugUtilsMessengerEXT(instance, debugMessenger, nullptr);
128 }
129
130 vkDestroySurfaceKHR(instance, surface, nullptr);
131 vkDestroyInstance(instance, nullptr);
132
133 glfwDestroyWindow(window);
134
135 glfwTerminate();
136 }
137
138 void createInstance() {
139 if (enableValidationLayers && !checkValidationLayerSupport()) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected