public void Dispose() { WaitForGpu(); while (delayDestroy.Count > 0) { var p = delayDestroy.Dequeue(); p.pipelineState?.Dispose(); p.resource?.Dispose(); } foreach (var commandAllocator in commandAllocators) { commandAllocator.Dispose(); } if (screenResources != null) { foreach (var screenResource in screenResources) { screenResource.Dispose(); } } dxgiFactory?.Dispose(); commandQueue?.Dispose(); cbvsrvuavHeap?.Dispose(); dsvHeap?.Dispose(); rtvHeap?.Dispose(); swapChain?.Dispose(); fence?.Dispose(); device?.Dispose(); adapter?.Dispose(); }
public void Dispose() { resource?.Dispose(); resource = null; renderTargetView?.Dispose(); renderTargetView = null; depthStencilView?.Dispose(); depthStencilView = null; }
public void Dispose() { currentHeap?.Dispose(); currentHeap = null; }
public void Dispose() { heap?.Dispose(); heap = null; }