it seems even when i set the HostWindow.CloseAction to DockWindowCloseAction.CloseAndDispose the controls / form which is hosted doesnt get disposed. The only way to to reduce memory usage is to call GC.Collect() manually. Is there a more elegant way to reduce the memory usage?
thx 4 help
1 Answer, 1 is accepted
answered on 18 Mar 2011, 09:01 AM
Thank you for writing.
Once you set the CloseAction to CloseAndDispose, GC will dispose the necessary object in one of the next passes.
I guess that your inconvenience is caused by the fact that the Garbage Collector releases the necessary instances later than it frees a less complex control. The reason is that our RadControls are second generation Garbage Collector objects. In case you would like to release the memory instantly after the subform is closed, you can only call the GC.Collect method manually. More information on garbage collection generations can be found in this MSDN article.
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!