Beispiel #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    Server.Dispose();
                    Character.Dispose();
                    Map.Dispose();
                    Fight.Dispose();
                    Managers.Dispose();
                    Chat.Dispose();
                    Npcs.Dispose();
                    Storage.Dispose();
                    Exchange.Dispose();
                    Bid.Dispose();
                }

                Server    = null;
                Character = null;
                Map       = null;
                Fight     = null;
                Managers  = null;
                Chat      = null;
                Npcs      = null;
                Storage   = null;
                Exchange  = null;
                Bid       = null;

                disposedValue = true;
            }
        }
Beispiel #2
0
 public virtual void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             Buyers.Dispose();
             Buyings.Dispose();
             Managers.Dispose();
             Products.Dispose();
             _context.Dispose();
         }
         disposed = true;
     }
 }
        protected virtual void Dispose(bool disposing)
        {
            if (isDisposed)
            {
                return;
            }
            if (disposing)
            {
                //free unmanaged objects
                Managers.Dispose();
                //((IDisposable)_aetherContext).Dispose();
            }
            //clear managed objects
            Managers.Clear();
            Managers = null;
            //_moduleManager = null;
            //_aetherContext = null;

            isDisposed = true;
            return;
        }