in an interview one question is asked to me but dn't answered properly plz send the coorect one with explanation the question was: "How garbage collection is done in Java compiler ?"
regards
"Strenght is Life and Weakness is Death"<br />Java/J2EE Developer<br />UshaComm Pvt. Ltd, Kolkata, INDIA
Pat Hays
Ranch Hand
Joined: Aug 20, 2004
Posts: 138
posted
0
In my understanding, if a object in you program is on longer pointed by any variables, this object will be released automatically by Java garbage collection.
either that or our really bad ones. If you try to compile some truly horrendous code, the garbage collector gets it.
I've heard it takes forever to grow a woman from the ground
Julian Kennedy
Ranch Hand
Joined: Aug 02, 2004
Posts: 823
posted
0
Is this actually a question about some nuance of javac and how garbage collection is performed while compiling or just a misguided query as previous responses suggest? I understand that Sun's javac is implemented in Java so it must run in a JVM. I would expect it to run the same way as any other Java program, with a separate GC thread. However, it wouldn't surprise me if it operated differently somehow in some subtle way that would have no impact on 99% of us. Even if that were the case my gut reaction is to ask why would I care? Code gets compilied, garbage gets collected, what more is there to know?
Jules
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.