//[overrideFuctions] protected override void Dispose(bool disposing) { foreach (var resource in _resources) { CUDAInterop.cuSafeCall(CUDAInterop.cuGraphicsUnregisterResource(resource)); } foreach (var buffer in _buffers) { CUDAInterop.cuSafeCall(CUDAInterop.cuGLUnregisterBufferObject(buffer)); } if (_buffers.Length > 0) { GL.DeleteBuffers(_buffers.Length, _buffers); } if (disposing) { _vel.Dispose(); _disposeSimulators(); _worker.Dispose(); } base.Dispose(disposing); }
public void Dispose() { CUDAInterop.cuGLUnmapBufferObject(_buffer); CUDAInterop.cuGLUnregisterBufferObject(_buffer); }