| 249 | } |
| 250 | |
| 251 | void cleanupSwapChain() { |
| 252 | vkDestroyImageView(device, depthImageView, nullptr); |
| 253 | vkDestroyImage(device, depthImage, nullptr); |
| 254 | vkFreeMemory(device, depthImageMemory, nullptr); |
| 255 | |
| 256 | for (auto framebuffer : swapChainFramebuffers) { |
| 257 | vkDestroyFramebuffer(device, framebuffer, nullptr); |
| 258 | } |
| 259 | |
| 260 | for (auto imageView : swapChainImageViews) { |
| 261 | vkDestroyImageView(device, imageView, nullptr); |
| 262 | } |
| 263 | |
| 264 | vkDestroySwapchainKHR(device, swapChain, nullptr); |
| 265 | } |
| 266 | |
| 267 | void cleanup() { |
| 268 | cleanupSwapChain(); |
nothing calls this directly
no outgoing calls
no test coverage detected