Ejemplo n.º 1
0
        /// <summary>Clean up any resources being used.</summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!_isDisposed)
            {
                if (disposing)   // Free any managed objects here
                {
                    Landmarks?.Dispose(); Landmarks = null;
                    BoardHexes.Dispose();
                }

                // Free any unmanaged objects here

                _isDisposed = true;
            }
        }
Ejemplo n.º 2
0
 /// <inheritdoc/>
 protected virtual void Dispose(bool disposing)
 {
     if (!_isDisposed)
     {
         if (disposing)
         {
             var path = HexgridPath as IDisposable;
             if (path != null)
             {
                 path.Dispose(); path = null;
             }
             if (Landmarks != null)
             {
                 Landmarks.Dispose();   Landmarks = null;
             }
             if (_boardHexes != null)
             {
                 _boardHexes.Dispose(); _boardHexes = null;
             }
         }
         _isDisposed = true;
     }
 }