Free module file handles upon cleanup
This commit is contained in:
parent
50aa0b83ab
commit
6e9b125351
|
@ -184,7 +184,17 @@ void ModClear()
|
|||
{
|
||||
// Clean up all the modules
|
||||
EXCLUSIVE_ACQUIRE(LockModules);
|
||||
|
||||
for(const auto & mod : modinfo)
|
||||
{
|
||||
// Unload the mapped file from memory
|
||||
const auto & info = mod.second;
|
||||
if(info.fileMapVA)
|
||||
StaticFileUnloadW(StringUtils::Utf8ToUtf16(info.path).c_str(), false, info.fileHandle, info.loadedSize, info.fileMap, info.fileMapVA);
|
||||
}
|
||||
|
||||
modinfo.clear();
|
||||
|
||||
EXCLUSIVE_RELEASE();
|
||||
|
||||
// Tell the symbol updater
|
||||
|
|
Loading…
Reference in New Issue