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

Method cleanup

code/10_fixed_functions.cpp:120–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected