From 9da178ad569f6ff0809e1c6e023b54b962521b0e Mon Sep 17 00:00:00 2001 From: RedworkDE <10944644+RedworkDE@users.noreply.github.com> Date: Tue, 23 Dec 2025 12:34:04 +0100 Subject: [PATCH] review (2) --- Dalamud/Game/Chat/LogMessage.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dalamud/Game/Chat/LogMessage.cs b/Dalamud/Game/Chat/LogMessage.cs index 92217e1c6..fbe3dec3f 100644 --- a/Dalamud/Game/Chat/LogMessage.cs +++ b/Dalamud/Game/Chat/LogMessage.cs @@ -150,14 +150,12 @@ internal unsafe readonly struct LogMessage(LogMessageQueueItem* ptr) : ILogMessa // the formatting logic is taken from RaptureLogModule_Update - var utf8 = new Utf8String(); + using var utf8 = new Utf8String(); SetName(logModule, this.SourceEntity); SetName(logModule, this.TargetEntity); logModule->RaptureTextModule->FormatString(this.GameData.Value.Text.ToDalamudString().EncodeWithNullTerminator(), &ptr->Parameters, &utf8); - var result = new ReadOnlySeString(utf8.AsSpan()); - utf8.Dtor(); - return result; + return new ReadOnlySeString(utf8.AsSpan()); void SetName(RaptureLogModule* self, LogMessageEntity item) {