This thesis has been a study in memory management in C/C++, with practical work in finding and solving memory leaks in a large project. A background theory of C++ and memory management has been presented along with the memory problems that can arise in development in C/C++. Several topics in minimizing memory problems with using inbuilt C++ libraries and the Boost libraries have also been presented. There is also an overview of the PLC-Opt 2.2 Beta application and its inner workings. The method was to learn all about memory management and solve the memory leaks in PLC-Opt. The results showed that there were approximately 28.000 instances of memory leaks and the end result showed that approximately 700 instances of leaks remained unresolved. A list with clues of the remaining memory leaks was provided in the Future work chapter.