Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Garbage Collection

 
Mukti Bajaj
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
11. Which statements about garbage collection are true?
A) The garbage collector runs in low memory situations
B) You can run the garbage collector when ever you want.
C) When it runs, it releases the memory allocated by an object.
D) Garbage collector immediately runs when you set the references to null.
According to me, the answer should have been......C
But, the answers are A & C.
Can someone explain the reasons.
Thanks.
 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can't predict when garbage collector will run..so i think the answer will be c only..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic