[Gtk-sharp-list] SelectionData & presistent data
Miguel de Icaza
31 Oct 2002 12:03:59 -0500
> However, when I call sd.Text = "abc" (which calls
> gtk_selection_data_set_text ("abc", 3)), the string "abc" I believe
> exists only for the duration of that function call. The pointer that
> gets stored in the struct thus becomes bogus, and the real data isn't
> ever really available.
> What's the right way to do this? Do we need something like a C#
> wrapper around g_memdup and g_free for creating little persistent
> chunks of data like this?
Yes, we need to provide wrappers for g_strdup and g_free somewhere for
this particular purpose.