xNVSE / NVSE

New Vegas Script Extender (NVSE)
https://git.io/JfSAo
702 stars 55 forks source link

Add DispatchEvent(Alt)ThreadSafe to PluginAPI #140

Closed Demorome closed 2 years ago

Demorome commented 2 years ago

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.