I have code in QT creator and the following line creates memory leak:
action = new QAction(tr("New"), this);
action
is in mainwindow.h
.
According to Deleaker
, it causes memory leak. How can this happen, if I assign action
as a child to MainWindow
? So it has to be destructed as MainWindow is desctructed…
New contributor
lowsrtg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.