| ChrisRickard on Jul 9, 2008 at 11:32:54 PM (# 5) Why does it feel like you're asking us to answer a test question for you? pashah72 on Jul 10, 2008 at 10:41:14 PM (# 6)becoz I couldn't get the answer even after finding thru many sites & I have always counted on this site to give right answer.
ChrisRickard on Jul 11, 2008 at 12:33:59 AM (# 7)Well you can throw out 4 and 5. They are just made up Java-ish Memory-ish sounding names not really having to do with memory.
As to 1-3
Responsible for allocating memory upon object construction and freeing memory once objects are no longer referenced.
Java doesn't have explicit memory functions like malloc. Even at a lower level the JVM itself doesn't call a c malloc statement, but there is a mechanism where it asks the OS for a reserved chunk o' memory.
Constructors play a role in allocating memory at a higher conceptual level in that child objects are often initialized there, but I don't think it's what the question is looking for.
Here's a great whitepaper describing Java's Memory Management. pashah72 on Jul 14, 2008 at 5:19:38 AM (# 8)so the answer is no.1 : Garbage Collector...
|