There are any number of free and commercial libraries and other tools used to find memory and resource leaks in C++ code. However you haven't really identified so far that your application has a "leak". What you have identified is that it uses memory. Which of course any application does. A leak is somethere where memory is consumed unintentionally until all memory is gone.