Esempio n. 1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this._disposed)
     {
         if (disposing)
         {
             // Dispose managed resources here and free other state (managed objects).
             _NetworkChanged = null;
         }
         // Free your own state (unmanaged objects) and set large fields to null.
     }
     _disposed = true;
 }
Esempio n. 2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!this._disposed)
            {
                if (disposing)
                {
                    // Dispose managed resources here and free other state (managed objects).
                    _networkChanged = null;
                    IDisposable disposable = _nodeData as IDisposable;
                    if (disposable!=null)
                        disposable.Dispose();
                    _nodeData = null;

                    disposable = _edgeData as IDisposable;
                    if (disposable != null)
                        disposable.Dispose();
                    _edgeData = null;

                    if (_nodes != null)
                    {
                        _nodes.Clear();
                        _nodes = null;
                    }
                    if (_edges != null)
                    {
                        _edges.Clear();
                        _edges = null;
                    }
                }
                // Free your own state (unmanaged objects) and set large fields to null.
            }
            _disposed = true;
        }