title: How to properly close QWebView without result in memory leak?
body: <p>I have a custom <code>QWebView</code> declared as:</p>
  <pre><code>class browserControl : public QWebView {
    Q_OBJECT
   public:
           explicit browserControl(QWidget *parent = 0);
           ~browserControl();
    // ....
  }
  </code></pre>
  <p>it's a member of <code>MainWindow</code> class (the same one generated by Qt on GUI applications) I call <a href="http://doc.qt.io/qt-4.8/qwidget.html#show" rel="nofollow noreferrer">show()</a> when a button is hit. So it open the web browser in a new windows but when I close either the main window our the web browser it I got a bunch of memory leaks (it may differ from each run, depending on what the page opened, I guess) like (if I close main windows then browser)</p>
  <blockquote>
  <p>LEAK: 24 CachedResource</p>
  <p>LEAK: 231 WebCoreNode</p>
  </blockquote>
  <p>Or if I close the browser then main window:</p>
  <blockquote>
  <p>LEAK: 1 XMLHttpRequest</p>
  <p>LEAK: 49 CachedResource</p>
  <p>LEAK: 2528 WebCoreNode</p>
  </blockquote>
  <p>How do I fix this?</p>
  <p><strong>EDIT</strong></p>
  <p>The constructor code as asked:</p>
  <pre><code>browserControl::browserControl(QWidget *parent)
      : QWebView(parent)
  {
  }
  
  browserControl::~browserControl()
  {
  }
  </code></pre>