public void Recycle() { Release(); foreach (var chain in TripChains) { chain.Recycle(); } foreach (var chain in AuxTripChains) { chain.Recycle(); } TripChains.Clear(); AuxTripChains.Clear(); }
public void PopulateData(ITashaPerson person) { IterationSuccessful = true; TripChains.AddRange(person.TripChains); TripChains.AddRange(person.AuxTripChains); //setting this persons trip chains for this iteration foreach (var tc in TripChains) { foreach (var t in tc.Trips) { TripModes.Add(t, t.Mode); } } }
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); } }