README: how to run valgrind to search for memory leaks

This commit is contained in:
Sébastien Rombauts 2022-09-30 19:19:17 +02:00
parent ac7541aaf7
commit 955ad030d0

View File

@ -238,6 +238,15 @@ But SQLiteC++ does not support the fully thread-safe "Serialized" mode of SQLite
because of the way it shares the underlying SQLite precompiled statement
in a custom shared pointer (See the inner class "Statement::Ptr").
### Valgrind memcheck
Run valgrind to search for memory leaks in your application, the SQLiteCpp wrapper, or the sqlite3 library.
Execute the following command under Unix like OS (Linux, MacOS or WSL2/Ubuntu under Windows Subsystem for Linux):
```Shell
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose build/SQLiteCpp_example1
```
## Examples
### The first sample demonstrates how to query a database and get results: