Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what is garbage collection
#1
what is the definition and syntax of garbage collection and what is the example of it.

thanks.
Reply
#2
If a program continues to allocate memory for data buffers and eventually exceeds the physical memory capacity, the operating system then has to place parts of the program in virtual memory (on disk) in order to continue, which slows down processing. Writing the code to deallocate memory after a routine no longer needs it is a tedious task that programmers often forget to do. Java performs automatic garbage collection without programmer intervention, which eliminates this coding headache.
Then there a method available in java to run Garbage collection forcefully. System.gc(); method to force the garbage collection on that object.

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Difference between collection and arraylist. saneha 1 2,727 04-24-2011, 07:11 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)