D15326: Fix segfaults in OutputWidget
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Wed Sep 12 13:46:45 BST 2018
kossebau added a comment.
I have seen related crashes, and think I understand the basic reasoning. Sadly right now I fail to reproduce the crashes though, no idea why, so I am also unsure if I understood the problem :)
So just leaving initial comments, to be corrected during discussion.
> + // QSharedPointer destructor.
> + m_views.clear();
Isn't m_views destroyed (and thus implicitely cleared) before reaching the ~QWidget and ~QObject destructors where then any QObject-child-tree memory management is done?
So do we really need to explicitly call this here?
> + // such call.
> + delete m_tabwidget;
> + delete m_stackwidget;
This here might be more the actual issue, preventing the updateFilter slot being invoked during destruction because tabwidget or stackwidget emitting signals on their subwidgets being removed,
Not sure what is the better approach, only disconnecting from the currentChanged signals or straight deleting the widgets. Personally I tend to only handle the connections, and leave memory management of widgets completly to the Qt internals.
To: antonanikin, #kdevelop
Cc: kossebau, vkorneev, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel