Пример #1
0
 internal static void DestroyWorld()
 {
     if (!InitStarted)
     {
         return;
     }
     InitStarted = false;
     Destroyed   = true;
     Asr.IsFalse(__GlobalsCounter.HasAnyValue());
 }
Пример #2
0
        public void Release(ref T element)
        {
#if !M_DISABLE_POOLING
            Asr.IsFalse(_stack.Count > 0 && ReferenceEquals(_stack.Peek(), element),
                        "Internal error. Trying to release object that is already released to pool. ");

            _reset.Invoke(element);
            _stack.Push(element);
#endif

            element = null;
        }