From d120fd7ae1f249e97e7f7bbc2718a90b0d57bd6a Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 12 Nov 2025 13:15:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BE=D0=BF=D1=86=D0=B8=D0=BE=D0=BD=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=B7=D0=B0=D0=BA=D1=80=D1=8B=D1=82=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=91=D0=94=20=D1=85=D1=80=D0=B0=D0=BD=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=D1=89=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/cdcdb/dblite.d | 4 ++++ source/cdcdb/storage.d | 4 ++++ test/app.d | 2 ++ 3 files changed, 10 insertions(+) diff --git a/source/cdcdb/dblite.d b/source/cdcdb/dblite.d index b0514e1..8fe18b6 100644 --- a/source/cdcdb/dblite.d +++ b/source/cdcdb/dblite.d @@ -195,6 +195,10 @@ public: _db.execute("PRAGMA busy_timeout=%d".format(busyTimeout)); } + void close() { + _db.close(); + } + /// BEGIN IMMEDIATE. void beginImmediate() { diff --git a/source/cdcdb/storage.d b/source/cdcdb/storage.d index 5002057..0cbb5d3 100644 --- a/source/cdcdb/storage.d +++ b/source/cdcdb/storage.d @@ -57,6 +57,10 @@ public: initCDC(); } + void close() { + _db.close(); + } + void setupCDC(size_t minSize, size_t normalSize, size_t maxSize, size_t maskS, size_t maskL) { diff --git a/test/app.d b/test/app.d index 821aee9..75a5e97 100644 --- a/test/app.d +++ b/test/app.d @@ -81,4 +81,6 @@ void main() writeln("Все снимки удалены."); writeln("Версия библиотеки: ", storage.getVersion()); + + storage.close(); }