Does SQLite leak memory with the SQLCipher extension?
I've looked into this a bit further, and these reported leaks are a result of memory allocated by OpenSSL. Since SQLCipher doesn't know when the app is strictly done using it, EVP_cleanup()
is not called, and the memory is reported by valgrind as a leak. We're working towards a simple fix that will try to identify when the OpenSSL structures are no longer in use by SQLCipher with some simple reference counting, so EVP_cleanup()
can be called automatically.
As a quick workaround for this before the next release of SQLCipher, you could call EVP_cleanup()
manually in the program before exiting.