Ben,
It should call the Dispose automatically ... you shouldn't have to worry about it.
How did you create the custom control? Is it sub-classed from UserControl? It probably should be if it's not. And how did you create the dispose method? Did you override the base class Dispose?
~~Bonnie
>I created a custom control in my application which accesses a global collection of DataSets, adding a private DataSet for the control. WHen the form that houses the control closes, I want the control to then remove the private DataSet it created in the global collection. I used "Implements IDisposable" in my custom control, but when the form closes the control's Dispose method does not run. It does run however, when I terminate the entire application, I assume because the Garbage Collector at this point realizes that nothing is referencing the object in memory any longer.
>
>How di I get the dispose method of the control I created to run automatically when it's parent container form closes? I want to avoid calling .Dispose manually because then whoever uses this control has to remember to manyally dispose the control each time it's used, otherwise there will be memory left in use for datasets that are no longer needed.
>
>Help! :-)