[webkit-help] Assigning String::utf8().data to another pointer

Antonio Gomes tonikitoo at gmail.com
Sat Nov 20 06:42:47 PST 2010


what happens if you do:

>     String trial("trial");
>     single = trial.utf8().data();

single = strdup(trial.utf8().data())

>     std:: cout << "trial is " << trial.utf8().data() << std::endl;
>     std:: cout << "single is " << single << std::endl;

free(single);

?

--Antonio


More information about the webkit-help mailing list