Freeing memory allocated with gtk_*_new()

What is the "proper" way to free memory allocated with gtk_*_new()?
For instance:

GtkWidget * foo = gtk_label_new ( "bar" );

/* use foo */

free ( foo );  /* this is wrong, right? */

gtktypes.h declares gtk_type_free, but do I use that or is there some
other (preferred) way to do it?

Sean C. Rhea

                  --- Please respond to ---

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