Install leaktracer by entering the following commands in the terminal:
sudo apt update sudo apt install leaktracer
Description:
Simple and efficient memory-leak tracer for C++ programs
LeakTracer traces calls to new and delete, and reports inconsistencies in the C++-level memory-management. . It has limitations (eg. when you override the new and delete operators yourself), but is very easy to use (eg. compared to more complete tools like mpatrol), traces the C++ level (unlike most other tools), and gives pretty good results. . It uses gdb to display source-file information.
Version: 2.4-6
Section: universe/devel