Implemented IDisposable interface
@@ -31,7 +31,7 @@ namespace CatBoostNet
/// If you need to implement a custom model code, use <see cref="CatBoostModelEvaluator"/>
/// as the basic building block.
/// </summary>
- public class CatBoostModel : ITransformer
+ public class CatBoostModel : ITransformer, IDisposable
{
private CatBoostModelEvaluator Evaluator { get; }
@@ -221,5 +221,13 @@ namespace CatBoostNet
})
);
}
+
+ /// <summary>
+ /// Dispose of unmanaged resources
+ /// </summary>
+ public void Dispose()
+ {
+ Evaluator?.Dispose();
+ }
}
}
