Add a DestroyNotify field, and gtk_object_set_data_full() to match.
Tue Feb 10 15:01:44 1998 Owen Taylor <owt1@cornell.edu> * gtk/gtkobject.c gtk/gtkobject.h: Add a DestroyNotify field, and gtk_object_set_data_full() to match. * gtk/gtkobject.c (gtk_object_finalize): ObjectData structures were being added to a free list, then forgotten about. Just rely on GMemChunk instead.
This commit is contained in:
@ -260,6 +260,14 @@ void gtk_object_set_data (GtkObject *object,
|
||||
const gchar *key,
|
||||
gpointer data);
|
||||
|
||||
/* Like gtk_object_set_data, but takes an additional argument
|
||||
* which is a function to be called when the data is removed
|
||||
*/
|
||||
void gtk_object_set_data_full (GtkObject *object,
|
||||
const gchar *key,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy);
|
||||
|
||||
/* Get the data associated with "key".
|
||||
*/
|
||||
gpointer gtk_object_get_data (GtkObject *object,
|
||||
|
||||
Reference in New Issue
Block a user