I have some script objects which call asGetActiveContext in their constructors, using information from the custom user data. Since the asCModule::ResetGlobalVars function now takes a context pointer, those objects function properly.
I also need to have access to the context in the destruction of those objects, but there is no "active" context when a module is being discarded or when a context is being unprepared. Could the asCModule::Discard function be changed to take a context, and could the asCContext::Unprepare function be changed to set itself to the active context before releasing objects?
I haven't provided a patch myself, because I'm not sure if those changes would clash with the design or if there is some subtle issue with setting a context to the active one as it is unprepared.
Thanks