memory allocation/freeing



Hi,

I wonder who is considered maintaining memory with gtk.
eg the function

gchar *    gtk_editable_get_chars      (GtkEditable      *editable,
                                        gint              start_pos,
                                        gint              end_pos);

returns a (gchar *) pointer. When is it allocated/deallocated ...
Do I have to deallocate the pointer ?

The same for setting:

void       gtk_editable_insert_text   (GtkEditable       *editable,
                                       const gchar      *new_text,
                                       gint
new_text_length,
                                       gint             *position);

Are all pointers given into gtk_* functions considered to be copied ?

Bye
  Helge




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