Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

garbage collection

Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I came across this question in a mock exam .
Which statements about garbage collection are true?
Select all valid answers.
a)You can directly free the memory allocated by an object.
b)You can directly run the garbage collector whenever you want to.
c)The garbage collector informs your object when it is about to be garbage collected.
d)The garbage collector reclaims an object´┐Żs memory as soon as it becomes a candidate for garbage collection.
e)The garbage collector runs in low-memory situations
They say that the answer is b,c,e.
but my questions are
1)can we run it directly. i think we can only make a suggestion.
2)"gc runs under low memory situations". Is it compulsory. What I mean is that it may not get to run under those situations also.
what do you say on this question.
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just did a quick search on this topic and found this question has been discussed here before more than once. Please see the following discussion threads...
Discussion 1
Discussion 2
Discussion 3

Ofcourse, you can always come back and ask for more..
Good luck,
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic