Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-2335

Memory leak in Help plugin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 2.1.0
    • Qt Creator 2.1.0
    • Help System
    • None
    • Qt Creator master branch:
      commit 7aaaa750945cfd333404b20fa486e22bcb8dd732
      Author: Marco Bubke <marco.bubke@nokia.com>
      Date: Thu Sep 9 19:37:01 2010 +0200
    • ee3ad439a892021709b2bd149c5371897b7da10d

    Description

      Hi,

      There is a memory leak in Help plugin.

      http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/src/plugins/help/openpagesmanager.cpp#line66
      src/plugins/help/openpagesmanager.cpp line 66

      Created without parent - and no parent is setted up later.

      m_openPagesWidget = new OpenPagesWidget(m_model);

      explicit OpenPagesWidget(OpenPagesModel *model, QWidget *parent = 0);

      And it is not deleted manually somewhere.

      Stack for this memory leak:
      QTreeView::QTreeView(QWidget*) (qtreeview.cpp:187)
      Help::Internal::OpenPagesWidget::OpenPagesWidget(Help::Internal::OpenPagesModel*, QWidget*) (openpageswidget.cpp:90)
      Help::Internal::OpenPagesManager::OpenPagesManager(QObject*) (openpagesmanager.cpp:66)
      Help::Internal::HelpPlugin::initialize(QStringList const&, QString*) (helpplugin.cpp:158)
      ExtensionSystem::Internal::PluginSpecPrivate::initializePlugin() (pluginspec.cpp:925)
      ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin(ExtensionSystem::PluginSpec*, ExtensionSystem::PluginSpec::State) (pluginmanager.cpp:921)
      ExtensionSystem::Internal::PluginManagerPrivate::loadPlugins() (pluginmanager.cpp:780)

      Perhaps to fix
      m_openPagesWidget = new OpenPagesWidget(m_model, this);
      should be enough.

      Attachments

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

        Activity

          People

            heimrich Karsten Heimrich
            mdn Denis Mingulov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes