From 53a39b9ecf6c190e93788843277a482373d95036 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Mon, 8 May 2023 21:05:50 -0400 Subject: [PATCH] Don't keep this in memory when it is not needed. --- chatllm.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chatllm.cpp b/chatllm.cpp index e5033679..64d0912d 100644 --- a/chatllm.cpp +++ b/chatllm.cpp @@ -474,4 +474,6 @@ void ChatLLM::restoreState() qDebug() << "chatllm restoreState" << m_chat->id() << "size:" << m_state.size(); #endif m_llmodel->restoreState(static_cast(reinterpret_cast(m_state.data()))); + m_state.clear(); + m_state.resize(0); }