• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

gc

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kindly answer my queries on foll. questons
(1) GC
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 your object's memory as
soon as it becomes a candidate for garbage collection.
E. The garbage collector runs in low-memory situations.
(2)
a) The programmer has a method for immediately freeing the
memory of an object.
b) Garbage collection happens at set intervals of time.
c) The programmer can signify through a reference that an
object is no longer needed.
Is c is right or wrong
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For Question 1 . I think C is more appropriate. (It calls Finalize method).wrt to D&E We cant gurantee those things. The GC may run in low-memory situations.
For question 2 . It would be nice to see the whole question and other choices.Assuming that question is some thing to do with GC properties C could be a possible candidate , but here again programmer may signify by invoking finalize but object may again make itself available.can you please post the whole question ??
 
What's brown and sticky? ... a stick. Or a tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic