title: QML does not free a lot of memory, when dynamically created object has a parent
body: <p>I use <code>Component.createObject()</code> method to dynamically create an object. After that I delete the object using the <code>destroy()</code> method.<br>
  If I call the method <code>Component.createObject(null)</code> without parent argument (with null), then <code>destroy()</code> method frees the memory. If I call the method with some <code>parent</code> then <code>destroy()</code> method does not free a lot of memory. When creating a large number of objects, this results in exceeding the permissible amount of memory per process in Windows OS and leads to app crash.<br>
  Code to reproduce the problem:<br>
  <code>main.qml</code></p>
  
  <pre><code>import QtQuick 2.8
  
  Item {
      visible: true
      width: 640
      height: 480
  
      Scene {
          id: scene
          anchors.fill: parent
      }
  }
  </code></pre>
  
  <p><code>Scene.qml</code></p>
  
  <pre><code>import QtQuick 2.8
  
  Item {
      id: scene
  
      Component.onCompleted: {
          var tileComponent = Qt.createComponent("Tile.qml");
  
          for (var i = 0; i &lt; 200000; ++i) {
              var tile = tileComponent.createObject(scene);
  //          var tile = tileComponent.createObject(null); // this works well, but I need a parent
              tile.destroy();
          }
      }
  }
  </code></pre>
  
  <p><code>Tile.qml</code></p>
  
  <pre><code>import QtQuick 2.8
  
  Rectangle {
      width: 100
      height: 100
  
      color: "orange"
  }
  </code></pre>
  
  <p>The variant with parent uses 40 MB of memory after <code>destroy()</code>, without parent - 12 MB. If I continue to create and destroy such objects, the memory used continues to grow.<br>
  How can I dynamically create and destroy a lot of objects with parent avoiding the problem with memory?<br>
  I have tested Qt 5.9.1 (MinGW 5.3.0 compiler) and Qt 5.8.0 (MSVC 2015) on Windows 7 x64.</p>