Stetic.Application.ClearCollections C# (CSharp) Method

ClearCollections() protected method

protected ClearCollections ( ) : void
return void
        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 ();
            }
        }