From 636a874d58b6c28efece3f6ff62b9478c096ee18 Mon Sep 17 00:00:00 2001 From: howsohazard <143410553+howsohazard@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:04:35 -0400 Subject: [PATCH] 21000: Fixes performance bug in string interning (#189) --- src/Amalgam/string/StringInternPool.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Amalgam/string/StringInternPool.h b/src/Amalgam/string/StringInternPool.h index 6b5ef4d8..3ccd239c 100644 --- a/src/Amalgam/string/StringInternPool.h +++ b/src/Amalgam/string/StringInternPool.h @@ -306,9 +306,10 @@ class StringInternPool //one is static, destroy the other if(sid_1_static) - DestroyStringReference(sid_2_static); + DestroyStringReference(sid_2); else - DestroyStringReference(sid_1_static); + DestroyStringReference(sid_1); + return; } std::array string_ids = { sid_1, sid_2 };