Project

General

Profile

Bug #3807

[wt-git] WItemDelegate causes memory leak?

Added by Anonymous over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Benoit Daccache
Target version:
Start date:
02/19/2015
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I specialised the WItemDelegate class and I saw that the editor widget is never destructed. The default implementation of doCloseEditor is:

void WItemDelegate::doCloseEditor(WWidget *editor, bool save) const
{
  closeEditor().emit(editor, save);
}

When the editor has to be destructed? I suppose after emitting the closeEditor signal, i.e., :

void WItemDelegate::doCloseEditor(WWidget *editor, bool save) const
{
  closeEditor().emit(editor, save);
  delete editor;
}

Best regards,

Stoycho


Files

Main.cpp (3.27 KB) Main.cpp memory leak when delegate is set for column > 0 Стойчо Стефанов Stoycho Stefanov, 03/24/2015 05:41 PM

Also available in: Atom PDF