w*r
6 楼
well, theoratically, if JVM got killed, all memory claimed by JVM should be
reclaimed by OS, right? It is just a matter how can you be sure the JVM exit
gracefully. Correct me if I were wrong, to my understanding, once outofmem
exception occured, it would be quite unlikely to have JVM exit gracefully by
simply calling system.exit(), best way to do it is kill-9
【在 a**e 的大作中提到】
: as you wish
reclaimed by OS, right? It is just a matter how can you be sure the JVM exit
gracefully. Correct me if I were wrong, to my understanding, once outofmem
exception occured, it would be quite unlikely to have JVM exit gracefully by
simply calling system.exit(), best way to do it is kill-9
【在 a**e 的大作中提到】
: as you wish
q*s
7 楼
我的问题是
如果我在一个类里定义了一个static的reference
指向collection或者map,现在我运行的程序退出了,
难道collection或map中的element还不能被回收。
JVM die是什么意思?
colle
memor
【在 B*********h 的大作中提到】
: 有。如:
: object A已经out of scope了,但是之前被放入一个collection或者map里。如果colle
: ction和map是static,那么就算enclosing object被GC了,A还不会被GC.
: 当然Java并没有严格意义上的memory leak.
: 用SDK里的JConsole就能检测内存使用情况。如果需要更强的功能,要找个好点的memor
: y profiler,如optimizeit.
如果我在一个类里定义了一个static的reference
指向collection或者map,现在我运行的程序退出了,
难道collection或map中的element还不能被回收。
JVM die是什么意思?
colle
memor
【在 B*********h 的大作中提到】
: 有。如:
: object A已经out of scope了,但是之前被放入一个collection或者map里。如果colle
: ction和map是static,那么就算enclosing object被GC了,A还不会被GC.
: 当然Java并没有严格意义上的memory leak.
: 用SDK里的JConsole就能检测内存使用情况。如果需要更强的功能,要找个好点的memor
: y profiler,如optimizeit.
m*t
9 楼
colle
memor
Yes, Java do have memory leak issue. GC can only claim java objects in the
heap. If the object is created by native code, it will not be garbage
collected. That's why you always need to close the database connection,
statements, or legacy system connector in finally block.
【在 B*********h 的大作中提到】
: 有。如:
: object A已经out of scope了,但是之前被放入一个collection或者map里。如果colle
: ction和map是static,那么就算enclosing object被GC了,A还不会被GC.
: 当然Java并没有严格意义上的memory leak.
: 用SDK里的JConsole就能检测内存使用情况。如果需要更强的功能,要找个好点的memor
: y profiler,如optimizeit.
相关阅读
what is the problem?regular expression for whitespace in pathNo decent way for input password from command line.yahoo mail beta真cool啊什么样的Projects, 新手练手最合适?国内的java培训spring多久能看完OOPLSA的牛人还挺多key design问个基本问题也问个SOAP相关问题apache axis2?regex急求帮助eclipse下生成的jar file不包含libraryjava.lang.LinkageError: loader constraints violated when linking javax/xml/namespace/QName class换个斑竹吧eclipse有没有update变量名称的功能?用java画直线的问题SYSDEO tomcat的问题。what does "core java" mean?