/// <summary> /// Release the unmanaged memory associated with this Session. /// </summary> protected override void DisposeObject() { if (IntPtr.Zero != _ptr) { using (StatusChecker checker = new StatusChecker(null)) TfInvoke.tfeDeleteSession(ref _ptr, checker.Status); } }
/// <summary> /// Release the unmanaged memory associated with this Session. /// </summary> protected override void DisposeObject() { if (IntPtr.Zero != _ptr) { using (StatusChecker checker = new StatusChecker(null)) TfInvoke.tfeDeleteSession(ref _ptr, checker.Status); } if (_graphNeedDispose && _graph != null) { _graph.Dispose(); _graph = null; } if (_metaGraphDef != null) { _metaGraphDef.Dispose(); _metaGraphDef = null; } _graph = null; }