Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Will dynamic destruction of QML element using destroy automatically clean up memory of its children also?
QtWS25 Last Chance

Will dynamic destruction of QML element using destroy automatically clean up memory of its children also?

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qttester5
    wrote on last edited by
    #1

    Will dynamic destruction of QML element using destroy automatically clean up memory of its children also? Or must I also call destroy on all its children first?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      It is supposed clean up children. Did you face any problem ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chrisadams
        wrote on last edited by
        #3

        See http://qt-project.org/doc/qt-5.0/qtquick/qtquick-visualcanvas-topic.html#visual-parent for more information about this.

        The short answer is that there are two different "parenting" concepts in QtQuick (object ownership parenting, and visual item parenting). In most cases, the visual item parent is also the object ownership parent, but there are cases where they can be different.

        Cheers,
        Chris.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved