0
votes

I create my sqlite DB connection by using memory mode:

connection = DriverManager.getConnection("jdbc:sqlite:file:" + dbName + "?mode=memory&cache=shared")

And then use WAL-mode by excute: "pragma journal_mode=WAL"

I found that the memory size growing all the time when insert/delete operation. And it can not release even i call the wal_checkpoint(TRUNCATE).

1

1 Answers

2
votes

A in-memory database only supports memory mode or no journal. Using a journal file for a database that only exists in RAM and goes away when the program that uses it exits doesn't make any sense.