RadDocumentPane Closed? or Hidden?

ebaker

I'm using a RadDocking.PaneStateChange event handler to receive notification when one of the RadDocumentPanes is hidden. The RadDocumentPanes are created in code with the CanUserClose option set to True.

When the user clicks the cross control to close the pane, the PaneStateChange event handler is fired and the pane's IsHidden field is set to True. But... if there are no other references in my code to this RadDocumentPane object that has been hidden, or to any of its content, are the pane object and its content released and Garbage Collected? Or are they orphaned and just eating up memory? I guess the difference between "hiding" and pane and "closing" it are not clear to me.

I'm concerned about memory usage as I have several panes that can be opened, closed, and re-opened.

Miroslav Nedyalkov

First of all I would advise you to use the Close event of the Docking control to determine when a pane is closed instead of the PaneStateChange event.

When I pane is hidden it is not cleaned, but just hidden. If you need to clear the memory it uses you need to remove it from the Docking control and if you don't have other references the GC will do its job and clear it. The easies way to remove a pane from the Docking control is to use its RemoveFromParent method. For example you could handle the Close event and every time a pane is closed you could remove it to make sure it will clean the memory it occupies.

Of course there is a trade off - if you use the Save/load layout feature the content of the closed panes will not appear if you load a previously saved layout where these panes are not closed. This happens, because the content is removed from memory and the Docking control cannot load it.

Hope this information is helpful.

Best wishes,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items.

Miroslav Nedyalkov

Thank you for reporting us this problem. I logged it in PITS and we will investigate what causes this problem. The PITS item id is 2207.

Regards,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items.

Hristo

This pits issue is not public and is visible only under your account after login under Your Tracked Issues section.

Sincerely yours,
Hristo
the Telerik team

Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.