Hi Friends
How can you force garbage collection?
Garbage collection
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vithal WadjeRank #19 · 47.2K reputationPosted Nov 23, 2012, 1:11 AM EST
their is no need to force garbage collector,it automatically works
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 23, 2012, 3:57 AM EST
VulpesRank #55 · 29.2K reputationPosted Nov 23, 2012, 4:04 AM EST
Calling System.gc() prior to starting the critical operation minimizes the chance of this happening.