15 Jan
2007
15 Jan
'07
11:17 p.m.
Kees Cook spiegò:
With some help from mental, this is now fixed. General warning about using the .c_str() function on Glib::ustring's returned from objects: don't use 'em: they can get trashed on the heap. Instead, use a local Glib::ustring, and call it's .c_str() when you need it.
e.g.
No: char * str = Node->contents().c_str(); do_something( str );
Yes: Glib::ustring str = Node->contents(); do_something( str.c_str() );
Just curious: any idea why?
--
Buongiorno.
Complimenti per l'ottima scelta.