Exemple #1
0
 public void Dispose()
 {
     CommandQueue.Dispose();
     fixed(GPUBuffer *gpuBufferPtr = _gpuBuffers)
     {
         for (int iMemObj = 0; iMemObj < Arguments; iMemObj++)
         {
             (gpuBufferPtr + iMemObj)->MemoryObject.Dispose();
         }
     }
 }
Exemple #2
0
        public void Dispose()
        {
            _commandQueue.Dispose();
            fixed(IntPtr *memObjPtr = _memObj)
            {
                for (int iMemObj = 0; iMemObj < Arguments; iMemObj++)
                {
                    (*(Mem *)(memObjPtr + iMemObj)).Dispose();
                }
            }

            Marshal.FreeHGlobal((IntPtr)_memObjSize);
        }