Quote from gkishot:
I wonder what would be an example of memory leaks in Java? Can't think of any.
There are plenty of ways of leaking memory in a Java app. One of the easiest is to put objects into a Collection eg a Vector. If you don't explicitly remove them or call clear (), the memory will leak when the Collection goes out of scope.
Another way is to leave references to an object lying around when the app no longer needs that object.
The good news is that excellent Java profilers (such as Netbeans profiler) make finding leaks relatively painless.