I am a little unclear on how this is supposed to work. In fact
this crashes on me all the time.

ostream& operator<< (ostream& target, const DOMString& s)
{
    char *p = s.transcode();
    target << p;
    delete [] p;
    return target;
}

If the memory is allocated within a different heap (I am using the dll
supplied for windows) how can the user delete it? It specifically says in
the documentation that the user is supposed to delete the memory that is
allocated by transcode. Am I using this function wrong? If not then how can
I get a char* out of DOMString without memory leaks?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to