it depends when the temporary variable is being killed.
the line:
CString test2 = test.toStdString().c_str();
copy the data before the temporary object is being killed and its memory released.
anyway, to better show my problem:
take a look at the following code:
Qt Code:
test.toStdString();To copy to clipboard, switch view to plain text mode
third line fails.
it's the destructor of the temprary object that fails.
Again -
there is a good chance i'm doing something wrong:
only i don't see what.
hed.
Bookmarks