Re: g_utf16_to_utf8



On Fri, 17 Apr 2009, Fabrício Godoy <skarllot gmail com> wrote :

I thought (past of think?) that freeing the pointer, the ustring becomes to point to garbage.

No. When you create a Glib::ustring from a char array, the ustring is a new object containing a *copy* of the text, not a pointer. It's then quite OK to free the original char array.

The code below is right?

It looks good to me.
--
Rob Pearce                       http://www.bdt-home.demon.co.uk

The contents of this | Windows NT crashed.
message are purely   | I am the Blue Screen of Death.
my opinion. Don't    | No one hears your screams.
believe a word.      |


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