Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Fixed memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Causeless committed Dec 28, 2023
1 parent 631c038 commit 01a7119
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Managers/LuaMan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,9 @@ namespace RTE {
}

auto& newScript = m_ScriptCache[funcObjectName.c_str()];
for (auto& pair : newScript.functionNamesAndObjects) {
delete pair.second;
}
newScript.functionNamesAndObjects.clear();
for (const std::string& functionName : functionNamesToLookFor) {
luabind::object functionObject = funcHoldingObject[functionName];
Expand Down

0 comments on commit 01a7119

Please sign in to comment.