Re: memory leak in PangoLayout?

On 06/05/11 17:28, Olivier Sessink wrote:
Hi all,

valgrind reports a memory leak in the following code:

widget_get_string_size(GtkWidget * widget, gchar * string)
    PangoLayout *layout;
    gint retval = -1;
    layout = gtk_widget_create_pango_layout(widget, string);
    if (layout != NULL) {
        pango_layout_get_pixel_size(layout, &retval, NULL);
    return retval;

but it seems 100% perfect to me. Why would this leak memory??

anybody a clue?

gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

Just a thought, GTK could be using slab memory allocation, so the memory is still allocate to GTK, but can be used later by gtk as required, without inefficiencies caused by memory fragmentation.

I have not seriously programmed with GTK for about a year and am not saying that GTK has no leaks, but IMHO, nearly all the complaints about GTK leaking memory are due to the inexperience of the posters, rather than GTK itself.

However if there is a valid fault, then the track record states it will be fixed fast.

Also are you using GTK2+ or GTK3 and what version.

Sometimes people complain about problems when they are using libraries that are five years old, and efforts made to reproduce the problem dont show any fault.

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