Disposing of dynamic objects eg shapes

2 posts, 0 answers
  1. Czeshirecat
    Czeshirecat avatar
    14 posts
    Member since:
    Jun 2016

    Posted 25 Jul Link to this post

    Hi,

    If I create a shape dynamically and assign it,  who is responsible for the disposal of it?

    e.g. where _buttonElement is a RadButtonElement in the code fragment below, do I need to add code to dispose of it or will the ButtonFillElement do it?

    _buttonElement.ButtonFillElement.Shape = new EllipseShape();

    thanks in advance.
  2. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 25 Jul Link to this post

    Hi Claire,

    Thank you for writing.

    We have a code that checks if the shape is set and disposes of it when the entire element is diposed

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik by Progress
    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
Back to Top