[Solved] QML gc() destroys dynamically created objects in array



  • I fill a javascript array with dynamically created, unparented objects through Component.create(). After calling gc(), the objects are destroyed. Is this as intended, and why? Won't this result in erroneous behaviour when the garbage collector triggers itself?

    [Update]
    My bad. I stored a child object into the array, but not the "root", leaving it unreferenced. gc() obviously destroyed the parent with all the childs belonging to it.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.