I have been trying to track the reason behind the leak. The leak is indeed much more important when one opens the application places. I think it is caused by QML grid view not releasing grid items. I came to this conclusion by running unity-2d-places under Valgrind, with a debug-build of Qt. The two attached log files were created by running valgrind with the following options:
unity-2d-places-valgrind-normal.log is the log for current trunk
unity-2d-places-valgrind-rough.log is the log after having heavily hacked the result grid down to something really rough and ugly: only ListView and TextCustom QML items (I pushed it on lp:~agateau/unity-2d/xp-dash-leak, but be warned it is unusable: items overlap each others)
Both logs where created with the same steps:
- Open application place
- Type q
- Erase it
- Type w
- Erase it
- Close the dash
The second log shows a lot less leaks, but what worries me is that both show leaks coming from Qt Declarative allocating memory itself, so I am not sure how to address this.
I have been trying to track the reason behind the leak. The leak is indeed much more important when one opens the application places. I think it is caused by QML grid view not releasing grid items. I came to this conclusion by running unity-2d-places under Valgrind, with a debug-build of Qt. The two attached log files were created by running valgrind with the following options:
valgrind --leak-check=full \ value-errors= no \ loads-ok= yes \ reachable= yes \
--undef-
--partial-
--show-
unity-2d- places- valgrind- normal. log is the log for current trunk
unity-2d- places- valgrind- rough.log is the log after having heavily hacked the result grid down to something really rough and ugly: only ListView and TextCustom QML items (I pushed it on lp:~agateau/unity-2d/xp-dash-leak, but be warned it is unusable: items overlap each others)
Both logs where created with the same steps:
- Open application place
- Type q
- Erase it
- Type w
- Erase it
- Close the dash
The second log shows a lot less leaks, but what worries me is that both show leaks coming from Qt Declarative allocating memory itself, so I am not sure how to address this.