[java] how to detect memory leak
19 July 2007hprof is the most convinient way.
You must add “-Xrunhprof” to java VM.
For example, when you would like to trace “ex.test.MainClass”, a command is
% java -Xrunhprof ex.test.MainClass
hprof makes java.hprof.txt.
You can get heap, class, reference information, etc, from the file.
No comments yet


