Menu
Menu copied to clipboard
Memory leaks
Menu is leaking memory big time.
How can we analyze this?
So far I found out:
void findAppsInside(QStringList locationsContainingApps, QMenu *m_systemMenu, QFileSystemWatcher *watcher);
leaks memory, especially (but not only) the icons that get set on the QActions. This can be seen by using Heaptrack.
- What is the best way to fix this?
- Do we need to refactor this functionality into a QObject?
Also, searching leaks a lot of memory. Unfortunately, this cannot be seen by using Heaptrack because Heaptrack stops profiling before we have a chance to operate the Search menu.
- Why does Heaptrack profiling stop prematurely?
GammaRay ("Meta Objects" tab) appears to suggest that each search creates QActions which never get deleted. Also every switch between windows with menus.