Пример #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposed)
     {
         return;
     }
     XGBoostNative.XGDMatrixFree(handle);
     disposed = true;
 }
Пример #2
0
        // Dispose pattern from MSDN documentation
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            int output = XGBoostNative.XGDMatrixFree(_handle);

            if (output == -1)
            {
                throw new DllFailException(XGBoostNative.XGBGetLastError());
            }

            disposed = true;
        }