Memory Leak? pango_layout_set_markup

Either I'm doing something wrong, or there is a memory leak within
pango_layout_set_markup.  I have a PangoLayout that I am reusing to
render text to a drawable.  I'm just calling pango_layout_set_markup to
change the text.  It gets called quite a bit, and I noticed my program
growing.  I've isolated the memory leak to this function.  

So my question is: should I be explicitly freeing something, or is there
really a memory leak?

Reproducing the memory leak is trivial:

    #include <gtk/gtk.h>
    int main(int argc, char **argv)
    	GtkWidget *window;
    	PangoLayout *pl;
    	gtk_init(&argc, &argv);
    	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    	pl = pango_layout_new(gtk_widget_create_pango_context(window));
    	while (1)
    		pango_layout_set_markup(pl, "Foobar", 6);
If this is a genuine bug, please let me know and I will file it in
bugzilla.  If something does need to be freed, the API documentation
should be updated. :)


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