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

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

متابعة

What are the levels of garbage collection in java?

user-image
تم إضافة السؤال من قبل chaitanya kumar
تاريخ النشر: 2013/11/08
Ashok Yadav
من قبل Ashok Yadav , trainee , S.O Infotech Pvt. Ltd.

 

Garbage Collection in Java is carried by a daemon thread called Garbage Collector. Before removing an object from memory Garbage collection thread invokes finalize () method of that object and gives an opportunity to perform any sort of cleanup required.  You as Java programmer can not force Garbage collection in Java; it will only trigger if JVM thinks it needs a garbage collection based on Java heap size.There are methods like System.gc () and Runtime.gc () which is used to send request of Garbage collection to JVM but it’s not guaranteed that garbage collection will happen.

if you like the answer then plz like it..... :)

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

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