protected void ClearCollections()
{
lock (types) {
types.Clear ();
}
Component[] comps;
lock (components) {
// All components should have been cleared by the backend,
// just make sure it did
comps = new Component [components.Count];
components.Values.CopyTo (comps, 0);
components.Clear ();
}
foreach (Component c in comps) {
c.Dispose ();
}
}