예제 #1
0
 public void Recycle()
 {
     Release();
     foreach (var chain in TripChains)
     {
         chain.Recycle();
     }
     foreach (var chain in AuxTripChains)
     {
         chain.Recycle();
     }
     TripChains.Clear();
     AuxTripChains.Clear();
 }
예제 #2
0
파일: Person.cs 프로젝트: taha-islam/XTMF
        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);
            }
        }