1. How can you force garbage collection? [a] Garbage collection cannot be forced [b] Call System.gc(). [c] Call Runtime.gc(). [d] Set all references to null. Answer 1 [a] Garbage collection cannot be forced i think garbage collection canbe forced by calling System.gc()or Runtime.gc(). m I wrong?
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
posted
0
no it cannot be forced you can just tell the gc you would like it to run but nothing is guaranteed... Try to search the forum for "force garbage collection" you'll find some good discussion about the subject... HIH ------------------ Valentin Crettaz Sun Certified Programmer for Java 2 Platform
One can request to Sir Garabage Collection could you please run, rather then forcing, Mr.Garabage Collection Run Now! What do u think Valentin?. Bye. Viki.
------------------ Count the flowers of ur garden,NOT the leafs which falls away!
------------------ Valentin Crettaz Sun Certified Programmer for Java 2 Platform
Vikrama Sanjeeva
Ranch Hand
Joined: Sep 02, 2001
Posts: 756
posted
0
Just have done an overview of the article.It seems me good. Thanx. Bye. Viki. ------------------ Count the flowers of ur garden,NOT the leafs which falls away!
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.