System.ComponentModel.DebugTypeDescriptor.ComponentEntry.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( object component ) : void
component object
return void
            public void Dispose(object component) {
                if (component is IComponent) {
                    IDictionaryService ds = (IDictionaryService)GetService((IComponent)component, typeof(IDictionaryService));
                    if (ds != null) {
                        ds.SetValue(typeof(AttributeCollection), null);
                        ds.SetValue(typeof(EventDescriptorCollection), null);
                        ds.SetValue(typeof(PropertyStash), null);
                    }
                }
            }