/// <summary> /// Release unmanaged memory associated with this coco ssd mobilenet model. /// </summary> protected override void DisposeObject() { if (_interpreter != null) { _interpreter.Dispose(); _interpreter = null; } if (_model != null) { _model.Dispose(); _model = null; } }
protected virtual void Dispose(bool disposing) { //if (disposing) //{ // // Free managed resources //} // Free unmanaged resources if (_interpreter != null) { _interpreter.Dispose(); _interpreter = null; } if (_model != null) { _model.Dispose(); _model = null; } }
/// <summary> /// Release the IDiposable resources /// </summary> /// <param name="disposing">True if called from Dispose()</param> protected virtual void Dispose(bool disposing) { if (null == interpreter) { return; } // Dispose of the unmanaged resouces if (disposing) { InputTensor.Dispose(); OutputTensor.Dispose(); interpreter.Dispose(); flatBufferModel.Dispose(); } InputTensor = null; OutputTensor = null; interpreter = null; flatBufferModel = null; }