Created
April 30, 2020 06:18
-
-
Save bzm3r/fb299d9ff7a890b2d1508485b1cb6c6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl Drop for ExampleBase { | |
fn drop(&mut self) { | |
unsafe { | |
self.device.device_wait_idle().unwrap(); | |
self.device | |
.destroy_semaphore(self.present_complete_semaphore, None); | |
self.device | |
.destroy_semaphore(self.rendering_complete_semaphore, None); | |
self.device.free_memory(self.depth_image_memory, None); | |
self.device.destroy_image_view(self.depth_image_view, None); | |
self.device.destroy_image(self.depth_image, None); | |
for &image_view in self.present_image_views.iter() { | |
self.device.destroy_image_view(image_view, None); | |
} | |
self.device.destroy_command_pool(self.pool, None); | |
self.swapchain_loader | |
.destroy_swapchain(self.swapchain, None); | |
// self.device.destroy_device(None); | |
// self.surface_loader.destroy_surface(self.surface, None); | |
// self.debug_utils_loader | |
// .destroy_debug_utils_messenger(self.debug_call_back, None); | |
// self.instance.destroy_instance(None); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment