protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { shaderByteCode.SafeDispose(); computeShader.SafeDispose(); device.SafeDispose(); } lastFramePixels = null; disposedValue = true; } }