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

Disposal of pages closed by user

3 Answers 148 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Andrea
Top achievements
Rank 1
Andrea asked on 20 Jun 2016, 08:59 AM

Hi, i would like to know if when a user close a page on the pageview, the controls inside this page will be dereferenced (thus become eligible for garbage collection) or if I have to handle the closed event and manually remove all the controls inside the page.

Also would like to know if there is something I can do to cleanup removed pages or if the removed pages are automatically managed by the pageview control or if i have to call dispose on the page itself in the closed event.

It's just to be sure not to lock too much memory for too long time, i did not find a documentation page about this.

Best regards

Andrea

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 20 Jun 2016, 10:49 AM
Hi Andrea,

Thank you for writing.

Currently, the controls are not disposed when the page is closed. In this case, you need to dispose of them manually. This can be improved and this is why I have logged an item for this in our Feedback Portal. You can track the item for status changes and add your vote for it here.

Your Telerik Points have been updated for this report.

Should you have any other questions do not hesitate to ask.
 
Regards,
Dimitar
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
Andrea
Top achievements
Rank 1
answered on 20 Jun 2016, 12:17 PM

Thank you for the answer, I will manually handle this on the PageRemoved event, because there are some controls for which I keep a reference in the main form since they are reused and some other controls that have to be disposed.

 

Best Regards

Andrea

0
Dimitar
Telerik team
answered on 21 Jun 2016, 06:29 AM
Hi Andrea,

I am glad I could be of help. Let us know if you have any other questions.

Regards,
Dimitar
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Tags
PageView
Asked by
Andrea
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Andrea
Top achievements
Rank 1
Share this question
or