GtkLabel question



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi people,

I'm having some doubts about the GtkLabel widget: I'm using this widget
to show changing information to the user, every time I need to change
the information shown on the labels, I use the gtk_label_set_text()
function passing a newly allocated string.

The problem is that it seems that GtkLabel doesn't free() those strings
when I assign a new one to them, so my program has many memory leaks, I
checked it with Memprof.

How is the best solution to this? GtkLabel doesn't provide a function to
access directly to the pointer to free() it, and I don't think accessing
directly to the structure is a good idea.

Thanks in advance.

- --
Lucas Di Pentima - Santa Fe, Argentina - ICQ UIN: 6782045
LUNIX: Soluciones en GNU/Linux - http://www.lunix.com.ar
GnuPG Public Key:
http://pks.lugli.org.ar:11371/pks/lookup?op=get&search=lucas lunix
Key fingerprint = BD3B 08C4 661A 8C3B 1855  740C 8F98 3FCF 6AA5 4FC9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+yO0Uj5g/z2qlT8kRAvjUAKCcnAqOkwD2rIAsXpK+4+iKqzO9dACePEEF
CDpwQ8y+Mfvh8P4t9UifrDA=
=6+sz
-----END PGP SIGNATURE-----




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]