Learn Garbage Collection Day 21

Lecture 21 : Learn Garbage Collection

Garbage Collection :
  • The garbage collection (GC) manages the allocation and release of memory. 

  • The garbage collector serves as an automatic memory manager. 

  • When there isn’t enough memory to allocate an object, the GC must collect and dispose of garbage memory to make memory available for new allocations.

  • This process is known as garbage collection.

Garbage collection in the following advantages :
  • It also allocates objects on the managed heap efficient.

  • When objects are no longer used then it will reclaim those objects by clearing their memory, and keeps the memory available for future allocations.

  • Managed objects automatically get clean content to start with, so their constructors do not have to initialize every data field.

How GC runs at the Background :
  • Garbage collector runs at the background process.

  • Garbage collector runs at the undetermestic.

  • In background garbage collection (GC), as needed while the collection of progress.

  • Background garbage collection performed on one or more dedicated threads and the depending on whether it's background or server GC.

  • Background garbage collection is enabled by default.

Program-


Comments

Popular posts from this blog

Basic Concept In C Sharp Day 16

Understanding C Sharp Day 18

Concept In Angular Day 14