Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
Unhooking the ListManagerBindingsCollection (CollectionChangeEventHandler)
posted

Hi,

In our application, we have a number of static data sources we keep as a cache for commonly used drop down lists so they don't have to be repopulated from the data source. I am doing some memory profiling and am finding that after opening and closing our forms, there are many instances of the CollectionChangeEventHandler not being garbage collected. It happens when I bind datatables, IBindingList collections, or BindingList<> sources in both the UltraCombo and the UltraWinGrid. I have tried setting the UltraCombo.Datasource = null when disposing the control, but it won't release the ListChangedEventHandler. Am I doing something wrong? How can I get the UltraCombo and UltraWinGrid to 'unhook' these events when we dispose of them?

Thanks.