[Kde-games-devel] Pixmap leak?
Stefan Majewsky
kdemailinglists at bethselamin.de
Sat Jul 3 22:09:56 CEST 2010
On Friday 02 July 2010 16:25:06 Ian Wadham wrote:
> On Thursday 01 July 2010 1:58:53 pm Ian Wadham wrote:
> > ~QX11PixmapData(): QPixmap objects must be destroyed before the
> > QApplication object, otherwise the native pixmap object will be leaked.
>
> Maybe I did not make myself clear. Every KDE Game I have tried is getting
> these errors with trunk code as at 30 June - KBlocks, KBounce, KGoldrunner,
> KJumpingCube, KMahjongg, Kolf, KPat, Kubrick and Palapeli. Probably the
> KDE 4.5 release candidate has the same problem.
>
> KMahjongg and KPat, I have found, sometimes get the errors on later runs.
The only app which is "immune" to these errors at the moment is Killbots due
to revision 1138283. A similar (yet less hacky) solution to the problem is now
also included in KGameRenderer, so porting to KGameRenderer should kill the
messages.
Then again, Google tells me that the error messages are actually wrong.
According to [1] (the blog of Michael Pyne of KSharedDataCache fame), this
warning can safely be ignored because the X server cleans up any open
resources when a client disconnects, much like the kernel automatically closes
open file handles on app exit (or crash).
In slightly unrelated news (at least it has something to do with memory
management), I did measure today the memory usage of KDiamond before and after
the KGameRenderer port (both with and without disk cache), and observed in all
situations that the KGameRenderer-powered version is consistently using about
1MB less memory (which is about 7% of KDiamond's total in-process memory).
Greetings from Tampere
Stefan
[1] http://www.purinchu.net/wp/2010/05/02/today-i-learned/
[2] http://websvn.kde.org/?view=revision&revision=1138283
More information about the kde-games-devel
mailing list