protected virtual void Dispose(bool disposing) { if (disposed) { return; } XGBoostNative.XGDMatrixFree(handle); disposed = true; }
// 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; }