In this article we will learn about garbage collection, which is a mechanism for freeing the memory occupied by objects which are no longer used in a program. Garbage Collection In most of the object oriented programming languages, memory management (allocating and deallocating memory) is left to the user and it is generally error prone (user might forget to free the memory occupied by an object). Objects are allocated memory in the heap memory which grows and shrinks dynamically. Java provides automatic memory management through a mechanism known as garbage collection. Unused objects are collected for garbage collection by
The post How garbage collection is done in java appeared first on Coding Security.
How garbage collection is done in java
read more
Tidak ada komentar:
Posting Komentar