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