Memory Management and Garbage Collector

  • Faster object creation as Operating system level synchronisation is no more needed for each object. Object Allocation takes some memory and increases the offset.
  • When an object is not required, garbage collector reuses the object’s memory for further allocation

Back to Basics

How memory management works

Memory release techniques

When ?????

  • There is poor spatial memory in the system. Either the low memory warning from the OS or low memory as shown by the host senses this.
  • The memory used on the managed heap by assigned items surpasses an appropriate threshold. As the mechanism runs, this threshold is changed continuously.

What is Managed Heap ??

Generations in Garbage Collector

Generation Zero

Generation One.

Generation Two

Unmanaged Memory




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store