#include <gtk/gtk.h>

enum {
    N_TIMES = 50000
};

int
main (int argc, char *argv[])
{
    GtkWidget *w;
    int i;
	
    gtk_init (&argc, &argv);
    
    w = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    
    for (i = 0; i < N_TIMES; ++i)
    {
	PangoRectangle ink, logical;
	PangoLayout *layout;

	layout = gtk_widget_create_pango_layout (
	    w,
	    "It was the best of times, it was the worst of times");

	pango_layout_get_extents (layout, &ink, &logical);
	
	g_object_unref (G_OBJECT (layout));
    }
}
