Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94506

setting the parent on the constructor of QBoxLayout does not parent correctly the item. On delete of parent this ends up in memory leak

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.15.0 RC2
    • Active Qt
    • None
    • Linux/Other display system

    Description

      I have a widget and inside it I declare a QBoxLayout and place some children widgets. When the parent gets destroyed, the children persist. No destructor is called to them, like they were not parented correctly.

      To do the parenting of the QBoxLayout, I used the setting of the parent through the constructor, but not the setLayout. According to documentation, these operations should be equivalent.

      Although visually the behavior is correct, valgrind reported memory leak.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            foteini Foteini Katsarou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes