Merge branch 'memory_cleanup' of windoz/tdlib-fork into fork

This commit is contained in:
andreacavalli 2020-01-08 18:58:55 +01:00 committed by Gitea
commit e95193e4b3

View File

@ -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();