Follow-up Comment #29, bug #21851 (project freeciv):

I think this answer by email from Vasco Costa belongs here. Btw, thank you for
your work with gtk client.

>Guys,
I don't know if this is the issue but here is some info:
- if the memory leaks are severe it probably means we are leaking pixmaps
somewhere (it's the only thing that uses that much space).
- we had issues with severe memory leaks in citydlg.c when we did the initial
GTK+ 2.x client. I found out they were caused by the GtkImage widgets back
then (namely the units and possibly also the improvements icons). that's why I
eventually wrote the GtkPixcomm widget class (similar to the one present in
the Xaw client) to solve the memory leak and performance issues back then.
that supposedly solved the leaks.
- the production icons (added later) still used the standard GTK+ library
widgets (we never made our own specific list widget for this). so those should
use a lot of of memory. the fact is we shouldn't allocate any pixmaps or
pixbufs. We should just use the sprites data and redraw things as necessary to
avoid memory allocations.
- back then the easiest way to reproduce leaks was to repeatedly open and
close the city dialog.
- i also had issues with using Valgrind back then to debug the memory leaks.
but had some success with a leak detector tool that back then was used
developed by the GNOME developers (MemProf).

You guys should probably ask the GNOME or GTK+ developers what they currently
use to profile leak detection as they should have experience with this.
Valgrind should work but it's probably a configuration issue. See:
https://wiki.gnome.org/Valgrind

It hope this helps. I doubt there is a bug in X11 (it is usually pretty well
tested). I would not discount a bug in GTK+. But it is quite likely the bug is
in our application proper.

Regards,
-Vasco Costa
original GTK+/GTK+2.0 client port author.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?21851>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to