public override void Dispose() { for (int i = 0; i < this.SwapchainImages.Length; ++i) { VkApi.DestroyImageView(this.Device, this.SwapchainImages[i].View, null); } this.VkSwapchain.DestroySwapchain(this.Device, this.Swapchain, null); base.Dispose(); }
public override unsafe void Dispose() { scheduler.Dispose(); VkApi.DestroyImageView(this.Device, DepthBuffer.View, null); VkApi.DestroyImage(this.Device, DepthBuffer.Image, null); DepthBuffer.Allocation.Dispose(); VkApi.DestroyBuffer(this.Device, UniformBuffer, null); UniformAllocation.Dispose(); VkApi.DestroyBuffer(this.Device, VertexBuffer, null); VertexAllocation.Dispose(); VkApi.DestroyBuffer(this.Device, IndexBuffer, null); IndexAllocation.Dispose(); VkApi.DestroyBuffer(this.Device, InstanceBuffer, null); InstanceAllocation.Dispose(); Allocator.Dispose(); base.Dispose(); }