From 955ad030d0c30dc8ec4e6a0a48bf6943c1463356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Fri, 30 Sep 2022 19:19:17 +0200 Subject: [PATCH] README: how to run valgrind to search for memory leaks --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 8537202..4bbd015 100644 --- a/README.md +++ b/README.md @@ -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: