Beispiel #1
0
 public void Dispose()
 {
     if (stream != null)
     {
         stream.Dispose();
         stream = null;
     }
     if (d2dRenderTarget != null)
     {
         d2dRenderTarget.Dispose();
         d2dRenderTarget = null;
     }
     if (wicBitmap != null)
     {
         wicBitmap.Dispose();
         wicBitmap = null;
     }
     if (d2dFactory != null)
     {
         d2dFactory.Dispose();
         d2dFactory = null;
     }
     if (wicFactory != null)
     {
         wicFactory.Dispose();
         wicFactory = null;
     }
     if (memStream != null)
     {
         memStream.Dispose();
     }
 }
Beispiel #2
0
 public void Dispose()
 {
     RenderForm.Dispose();
     RenderTarget2D.Dispose();
     Factory2D.Dispose();
     Surface.Dispose();
     SwapChain.Dispose();
     Device.ImmediateContext.ClearState();
     Device.ImmediateContext.Flush();
     Device.Dispose();
     _gameRender.Dispose();
 }