Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     resource?.Dispose();
     resource = null;
     renderTargetView?.Dispose();
     renderTargetView = null;
     depthStencilView?.Dispose();
     depthStencilView = null;
 }
Exemplo n.º 3
0
 public void Dispose()
 {
     currentHeap?.Dispose();
     currentHeap = null;
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     heap?.Dispose();
     heap = null;
 }