Re: gtk_clist_append() question



On Wednesday 24 November 2004 02:02, Neil Zanella wrote:

> I would like to know, when I call gtk_clist_append()  does the
> underlying GtkCList widget take ownership of the char ** parameter? 

No.

As a general rule, all Gtk+ widgets keep their own copies of data you pass to 
them (and retain ownership over their own copy). The reason the parameter is 
a gchar ** is probably to avoid const confusion with regard to the 
array/array contents.

> So do I have to create a new one for each new row to avoid segfaults?

No.

(and you really shouldn't be using GtkCList any longer)

Cheers 
  -Tim



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