This is a migrated thread and some comments may be shown as answers.

raddock memory leak

1 Answer 77 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 15 Mar 2011, 12:08 PM
Hello,

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

Sort by
0
Stefan
Telerik team
answered on 18 Mar 2011, 09:01 AM
Hello Patrick,

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.

Best wishes,
Stefan
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!
Tags
Dock
Asked by
Patrick
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or