ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل himanshu mittal
تاريخ النشر: 2013/06/26
himanshu mittal
من قبل himanshu mittal

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.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟