Memory leak debug

When my game start running the avaliabe memory rapidaly drops from 30% to 2%. And at the end of 2%, there is a noticble lag and the avaliable memory back to 30% again.
I guess I must be creating enormous number new objects in the porcess. I look through my code but I couldn’t find where the leak is. So here is my qustion, is there any way you
can monitor the new objects being created on the fly?

Thanks in advance.

You want a memory profiler. Google can probably help you, I don’t know of a good free one off the top of my head. =)

VisualVM might help you, it also does memory profiling. See also this: http://rejeev.blogspot.com/2009/04/analyzing-memory-leak-in-java.html

In your “Java JDK installation directory\bin” you will find something called “jvisualvm”, try running that one.

// Json