Does the following graph indicate that I am using memory and it is not being garbage collected?

I expected the orange graph (the allocated heap) to go down once I start using less of the heap.
- Is this an invalid assumption?
- Once allocated, does the heap not
shrink until the program closes?
It is clear from the graph that your JVM is capable of shrinking the heap. This can be seen from the orange line taking a slight dip just before 3:10pm.
However, later on the JVM chooses to not shrink the heap. This is almost certainly because an insufficiently large fraction of the heap is unused. The behaviour is controlled by
-XX:MinHeapFreeRatioand-XX:MaxHeapFreeRatio.For a discussion, see http://stopcoding.wordpress.com/2010/04/12/more-on-the-incredible-shrinking-jvm-heap/