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

Memory leak in Debugger Plugin - m_snapshotHandler

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • Debugger
    • None
    • Qt Creator master branch:
      commit 7aaaa750945cfd333404b20fa486e22bcb8dd732
      Author: Marco Bubke <marco.bubke@nokia.com>
      Date: Thu Sep 9 19:37:01 2010 +0200
    • baf10fc86811a07290600247e8e1986d40ca8324

      Hi,

      There is another memory leak in Debugger plugin - related to m_snapshotHandler.

      http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/src/plugins/debugger/debuggerplugin.cpp#line1136

      src/plugins/debugger/debuggerplugin.cpp since line 1136

      136
      m_snapshotHandler = new SnapshotHandler;
      1137
      m_snapshotWindow->setModel(m_snapshotHandler->model());

      m_snapshotHandler is derived from QAbstractTableModel
      m_snapshotWindow is QAbstractItemView

      From docs: http://doc.qt.nokia.com/4.6/qabstractitemview.html#setModel "The view does not take ownership of the model unless it is the model's parent object because the view may be shared between many different views."

      m_snapshotHandler is not removed anywhere (and it has no parent)

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

            hjk hjk
            mdn Denis Mingulov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes