Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Is it possible to force jvm for garbage collection? if yes then how?

user-image
Question ajoutée par himanshu mittal
Date de publication: 2013/06/26

no no u can never force the jvm for garbage collection.
System.gc() method only sends the request to jvm for the garbage collection.
its all depend on jvm wheather it has to run the garbage collector or not.

simply call the system garbage collector System.gc(), for more information see the gc() documentation....
http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/System.html#gc()

System.gc() doesn't perform the proper GC tasks, it just makes the object a candidate for the GC.

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?