This reminds me of a CString::as_ptr()
considered harmful thread from a while back. Like others have already mentioned, you're getting a pointer to a temporary variable which will be dropped at the end of the as_ptr()
call (or thereabouts).
This reminds me of a CString::as_ptr()
considered harmful thread from a while back. Like others have already mentioned, you're getting a pointer to a temporary variable which will be dropped at the end of the as_ptr()
call (or thereabouts).