Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position


Join the forum, it's quick and easy

Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position
Virtual Position Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

what is garbage collection

View previous topic View next topic Go down

GMT + 3 Hours what is garbage collection

Post by Diya Sun May 29, 2011 2:55 pm

what is the definition and syntax of garbage collection and what is the example of it.

thanks.
Diya
Diya
Monstars
Monstars

Taurus Goat
Posts : 364
Join date : 2011-02-08
Age : 32
Notworthy

Character sheet
Experience:
what is garbage collection Left_bar_bleue10/500what is garbage collection Empty_bar_bleue  (10/500)

Back to top Go down

GMT + 3 Hours Re: what is garbage collection

Post by Vuhelper Sun May 29, 2011 2:56 pm

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.
avatar
Vuhelper
Deep Bench
Deep Bench

Posts : 97
Join date : 2011-05-29

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum