From 4fe9fdded67335d4112b29fcc836acd8b1043aba Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 28 May 2025 04:10:47 +0200 Subject: [PATCH] Optimize redundant string allocation in managed binary module unload --- Source/Engine/Scripting/BinaryModule.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Engine/Scripting/BinaryModule.cpp b/Source/Engine/Scripting/BinaryModule.cpp index ef76de61c..07feedf10 100644 --- a/Source/Engine/Scripting/BinaryModule.cpp +++ b/Source/Engine/Scripting/BinaryModule.cpp @@ -1184,8 +1184,7 @@ void ManagedBinaryModule::OnUnloading(MAssembly* assembly) for (int32 i = _firstManagedTypeIndex; i < Types.Count(); i++) { const ScriptingType& type = Types[i]; - const StringAnsi typeName(type.Fullname.Get(), type.Fullname.Length()); - TypeNameToTypeIndex.Remove(typeName); + TypeNameToTypeIndex.Remove(type.Fullname); } }