Disposing of dynamic objects eg shapes

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

    Posted 25 Jul Link to this post


    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
    Dimitar avatar
    1321 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. 
    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. DevCraft R3 2016 release webinar banner
Back to Top