Try OpenEdge Now
skip to main content
GUI for .NET Programming
Binding ABL Data to .NET Controls : Understanding the ProBindingSource : Programming considerations : Using the Dispose( ) method
Using the Dispose( ) method
Progress Software Corporation recommends calling the Dispose( ) method before you delete or release the ProBindingSource instance for garbage collection, especially for ProBindingSource instances bound to ProDataSets, which can use a lot of memory. A ProBindingSource creates a separate query for each expanded row in a hierarchical grid. If you delete the ProBindingSource object but maintain the ProDataSet, those extra queries remain in memory consuming resources until the automatic .NET garbage collection releases it. Using the Dispose( ) method, you can free the memory for these queries without deleting the associated ProDataSet.
Note: OpenEdge strongly recommends not relying upon the .NET Garbage Collector for cleaning up application objects such as AppObjects, SubAppObjects, and ProcObjectsdispose. The recommended practice is to manually call the Dispose () method on each of these application objects when they are no longer required.