Separate managed assembly unloading and scripting ALC reinitialization
Fixes an issue with multiple managed assemblies unloading and releasing all cached data before native resources were fully released in other assemblies.
This commit is contained in:
@@ -706,7 +706,9 @@ void Scripting::Reload(bool canTriggerSceneReload)
|
||||
modules.Clear();
|
||||
_nonNativeModules.ClearDelete();
|
||||
_hasGameModulesLoaded = false;
|
||||
MCore::OnMidHotReload();
|
||||
|
||||
// Release and create a new assembly load context for user assemblies
|
||||
MCore::ReloadScriptingAssemblyLoadContext();
|
||||
|
||||
// Give GC a try to cleanup old user objects and the other mess
|
||||
MCore::GC::Collect();
|
||||
|
||||
Reference in New Issue
Block a user