GC Triggers :When does Garbage Collection Occurs ?

CLR triggers the garbage collection when one of the following event occurs :

  1. GC.Collect() Method is called explicitly by code.
  2. Windows reporting low memory condition via Win32 notification.
  3. When CLR Unloads the AppDomain.
  4. When CLR is shutting down.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s