[Digikam-devel] Re: memory leak in trunk...
Andi Clemens
andi.clemens at gmx.net
Wed Dec 1 22:16:12 GMT 2010
Hmm I don't understand this.
The QMenu is assigned to the parent menu:
QMenu* menu = new QMenu(parent);
This line:
action = parent->addMenu(menu);
says (according to the Qt docs) that addMenu will NOT take ownership of
"menu", but since "menu" has the parent already set in the constructor, this
shouldn't be the problem.
Andi Clemens
-----------------
www.digikam.org
On Wednesday 01 December 2010 11:40:49 Gilles Caulier wrote:
> Andi,
>
> Sorry, the right one :
>
> ==14101== 7,872 (196 direct, 7,676 indirect) bytes in 1 blocks are
> definitely lost in loss record 6,726 of 6,808
> ==14101== at 0x40244F0: operator new(unsigned int)
> (vg_replace_malloc.c:214) ==14101== by 0x5FBD041:
> QAction::QAction(QObject*) (in
> /usr/lib/libQtGui.so.4.6.2)
> ==14101== by 0x647467E: ??? (in /usr/lib/libQtGui.so.4.6.2)
> ==14101== by 0x6474A4A: QMenu::QMenu(QWidget*) (in
> /usr/lib/libQtGui.so.4.6.2)
> ==14101== by 0x82B324C: QMenu*
> Digikam::AdvancedRenameWidget::createControlsMenu<Digikam::Modifier>(QList<
> Digikam::Modifier*>&) (advancedrenamewidget.cpp:212)
> ==14101== by 0x82B1A53:
> Digikam::AdvancedRenameWidget::registerParserControls()
> (advancedrenamewidget.cpp:274)
> ==14101== by 0x82B1B34:
> Digikam::AdvancedRenameWidget::calculateLayout()
> (advancedrenamewidget.cpp:306)
> ==14101== by 0x82B1B1E:
> Digikam::AdvancedRenameWidget::setParser(Digikam::Parser*)
> (advancedrenamewidget.cpp:301)
> ==14101== by 0x82AD54D:
> Digikam::AdvancedRenameManager::setParserType(Digikam::AdvancedRenameManage
> r::ParserType) (advancedrenamemanager.cpp:160)
> ==14101== by 0x82AD452:
> Digikam::AdvancedRenameManager::setWidget(Digikam::AdvancedRenameWidget*)
> (advancedrenamemanager.cpp:137)
> ==14101== by 0x82F0470:
> Digikam::QueueSettingsView::QueueSettingsView(QWidget*)
> (queuesettingsview.cpp:156)
> ==14101== by 0x82E4167: Digikam::QueueMgrWindow::setupUserArea()
> (queuemgrwindow.cpp:222)
>
> Gilles
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
More information about the Digikam-devel
mailing list