public static void UpdateCache() { System.Collections.Generic.List <QuadHold> rem = new System.Collections.Generic.List <QuadHold>(); int time = Environment.TickCount; foreach (var q in Quads) { if ((q.LastUsed + 500) < time) { rem.Add(q); } } foreach (var rq in rem) { Quads.Remove(rq); } }
//Remove a quad public void RemoveQuad(Quad quad) { Quads.Remove(quad); }