| 256 | } |
| 257 | |
| 258 | void cleanupSwapChain() { |
| 259 | vkDestroyImageView(device, depthImageView, nullptr); |
| 260 | vkDestroyImage(device, depthImage, nullptr); |
| 261 | vkFreeMemory(device, depthImageMemory, nullptr); |
| 262 | |
| 263 | for (auto framebuffer : swapChainFramebuffers) { |
| 264 | vkDestroyFramebuffer(device, framebuffer, nullptr); |
| 265 | } |
| 266 | |
| 267 | for (auto imageView : swapChainImageViews) { |
| 268 | vkDestroyImageView(device, imageView, nullptr); |
| 269 | } |
| 270 | |
| 271 | vkDestroySwapchainKHR(device, swapChain, nullptr); |
| 272 | } |
| 273 | |
| 274 | void cleanup() { |
| 275 | cleanupSwapChain(); |
nothing calls this directly
no outgoing calls
no test coverage detected