Exemple #1
0
 public void Recycle()
 {
     Release();
     foreach (var chain in TripChains)
     {
         chain.Recycle();
     }
     foreach (var chain in AuxTripChains)
     {
         chain.Recycle();
     }
     TripChains.Clear();
     AuxTripChains.Clear();
 }
Exemple #2
0
        public void Recycle()
        {
            Release();
            var chain = TripChains;

            for (int i = 0; i < chain.Count; i++)
            {
                chain[i].Recycle();
            }
            chain = AuxTripChains;
            for (int i = 0; i < chain.Count; i++)
            {
                chain[i].Recycle();
            }
            TripChains.Clear();
            AuxTripChains.Clear();
            if (People.Count < 100)
            {
                People.Add(this);
            }
        }