EDIT: this doesn't work as-is, since pointers to strings can be invalidated, and this doesn't store a copy of the string arg.
EDIT 2: added a workaround for that, in the form of an OnDispatchEnd callback, so coders can allocate memory before calling the function, then free it in the callback, if needed.
EDIT: this doesn't work as-is, since pointers to strings can be invalidated, and this doesn't store a copy of the string arg. EDIT 2: added a workaround for that, in the form of an OnDispatchEnd callback, so coders can allocate memory before calling the function, then free it in the callback, if needed.