Ejemplo n.º 1
0
        internal void ClearSessionData()
        {
            if (applicationIsQuitting)
            {
                return;
            }

            var toWipe = new List <int>();

            foreach (var pair in data)
            {
                var isKernel = pair.Value as IKernel;
                if (isKernel == null)
                {
                    toWipe.Add(pair.Key);
                }

                var needToBeCleaned = pair.Value as IDisposable;
                if (needToBeCleaned == null)
                {
                    continue;
                }

                needToBeCleaned.Dispose();
            }

            HandlePool.Dispose();
            ProcessorGroups.Dispose();
            ProcessorTimer.Default.Dispose();
            ProcessorScene.Default.Dispose();
            ProcessorUpdate.Default.Dispose();
            Box.Default.Dispose();

            for (var i = 0; i < toWipe.Count; i++)
            {
                data.Remove(toWipe[i]);
            }
        }
Ejemplo n.º 2
0
 protected Processor()
 {
     ProcessorGroups.Setup(this);
     ProcessorSignals.Add(this);
     Toolbox.disposables.Add(this);
 }