Garbage Collector(GC):
- Garbage collector(GC) is responsible to provide automatic memory management.
What is Automatic Memory Management:
- Garbage collector has its own engine known as optimizing engine. which runs when required and divides objects into two categories.
- Objects in use
- Idled objects (known as Garbage)
- Objects in use are kept in the memory and idled objects are destroyed from the memory.
- This process known as Automatic Memory Management.
Why Automatic Memory Management:
- There do not be any problem of insufficient memory
- Burden on the programmer is reduced i.e programmer need not write code to perform memory tasks.
No comments:
Post a Comment