Good question. I am not by any means certain, and would like a more absolute answer as well.
However, based on my experience in using the AsciiString, I never found any memory leaks by not deallocating the char string myself, implying that v8 owns the memory at least. Further, the *operator seems to traditionally access a contained value -- meaning the value itself is not yours. To be safe, I would not modify it. Alex Sent from Alex's iPhone On Feb 26, 2009, at 3:22 PM, Stephan Beal <[email protected]> wrote: > > Hi, all! > > The complete API docs for String::AsciiString are: > > <quote> > Converts an object to an ascii string. Useful if you want to print the > object. > </quote> > > Can someone out there tell me what the semantics of: > > char * String::AsciiString::operator* () const > > are? i.e., who owns the returned string? And can i legally modify the > contents? (And if not, why is it not const?) > > > --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
