data is of a type CString. While I'm not familiar with the type it is reasonable to assume it will do its own copy.
Yes, all is handled by the custom class.
This is a nonstandard function, but you didn't say what platform you're on, so...
Cross-Platform is needed, but I didn't think a platform test was needed for this specific case.