The way we actually solve this type of problem is by using the `memory_analyzer' library. This is a graphical tool that let you take memory snapshot and compare them. That way you know what changes between two snapshot. Then for each object of a certain kind, you can actually find out the referrers and usually this kind give you a clue where the memory leak is. In your case, because the leak seems to be on SPECIAL objects and that you have more than 30000 it might be difficult to find out which ones are the newly created one. So ideally, the snapshots have to be done at the very early stage of the program execution so that manual inspect can be done. In addition, the major causes of memory leaks are: - keeping object in an observer pattern structure without removing them when not needed anymore - calling some C externals that might prevent the object to be garbage collected - having objects being referenced from a once routine - putting objects as part of an agent that is kept forever.