From 3d4fdae800dbdb1203aebe6910507d34de94bd7b Mon Sep 17 00:00:00 2001 From: "andrew (from workstation)" Date: Tue, 7 Jan 2020 14:49:47 +0100 Subject: [PATCH] shrink memory --- td/telegram/MessagesDb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/td/telegram/MessagesDb.cpp b/td/telegram/MessagesDb.cpp index b46d35bd..2cbfc5a3 100644 --- a/td/telegram/MessagesDb.cpp +++ b/td/telegram/MessagesDb.cpp @@ -293,6 +293,7 @@ class MessagesDbImpl : public MessagesDbSyncInterface { if (seqno_ % 8128 == 0) { TRY_STATUS(db_memory_.exec("DELETE FROM messages WHERE seqno < " + to_string(seqno_ - 7168))); + TRY_STATUS(db_.exec("PRAGMA shrink_memory")); } add_message_stmt_.bind_int32(12, seqno_).ensure(); -- 2.45.2