| 263 | } |
| 264 | |
| 265 | void cleanupSwapChain() { |
| 266 | vkDestroyImageView(device, depthImageView, nullptr); |
| 267 | vkDestroyImage(device, depthImage, nullptr); |
| 268 | vkFreeMemory(device, depthImageMemory, nullptr); |
| 269 | |
| 270 | vkDestroyImageView(device, colorImageView, nullptr); |
| 271 | vkDestroyImage(device, colorImage, nullptr); |
| 272 | vkFreeMemory(device, colorImageMemory, nullptr); |
| 273 | |
| 274 | for (auto framebuffer : swapChainFramebuffers) { |
| 275 | vkDestroyFramebuffer(device, framebuffer, nullptr); |
| 276 | } |
| 277 | |
| 278 | for (auto imageView : swapChainImageViews) { |
| 279 | vkDestroyImageView(device, imageView, nullptr); |
| 280 | } |
| 281 | |
| 282 | vkDestroySwapchainKHR(device, swapChain, nullptr); |
| 283 | } |
| 284 | |
| 285 | void cleanup() { |
| 286 | cleanupSwapChain(); |
nothing calls this directly
no outgoing calls
no test coverage detected