Disposal of pages closed by user

4 posts, 1 answers
  1. Andrea
    Andrea avatar
    52 posts
    Member since:
    Oct 2012

    Posted 20 Jun Link to this post

    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

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1413 posts

    Posted 20 Jun Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Andrea
    Andrea avatar
    52 posts
    Member since:
    Oct 2012

    Posted 20 Jun in reply to Dimitar Link to this post

    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

  5. Dimitar
    Admin
    Dimitar avatar
    1413 posts

    Posted 21 Jun Link to this post

    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.
Back to Top