JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums General Discussions How can I destroy the Smart instance after I created it?

This topic contains 1 reply, has 2 voices, and was last updated by Avatar Yavor Dashev 4 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #101801
    Avatar
    mannok
    Participant

    I have created a Smart instance of QueryBuilder. However, to avoid memory leak, I would like to destroy it after I no longer need it. Is there a function for me to destroy it afterwards?

    #101802
    Avatar
    Yavor Dashev
    Participant

    Hi mannok,

    When using SmartQueryBuilder you can ‘destroy’ it by using the remove() method like in the following code snippet:

        let queryBuilder = document.getElementById('queryBuilder');
            queryBuilder.remove();

    One thing to note here is that the remove() method removes the element from DOM.

    Let me know if that works for you!

    Please, do not hesitate to contact us if you have any additional questions.

    Best regards,
    Yavor Dashev

    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.