You should not instantiate a pointer with the result of ustr.ToCStr().Get().
The ToCStr() returns a CStr object which is created on the stack. When the next statement is executed the CStr object will be destroyed resulting an invalid pointer.
Use .ToCStr().Get() in function parameters only.
If you want to have a pointer use ustr.CopyUTF8 () instead, which returns a pointer to a newly allocated copy. This needs to be freed with delete.