About

Showing posts with label Basic garbage collection. Show all posts
Showing posts with label Basic garbage collection. Show all posts

Sunday, September 29, 2019

Basic garbage collection

In the common language runtime (CLR), the garbage collector serves as an automatic memory manager. 
It provides the following benefits:
  • Enables you to develop your application without having to manually free memory for objects you create.
  • Allocates objects on the managed heap efficiently.
  • Reclaims objects that are no longer being used, clears 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.