Multiple choice technology web technology

Garbage collector runs ?

  1. When Application is running for more than 30 minutes.

  2. Every 1/4th Milli Second.

  3. When application is running low of memory.

  4. Its very random and takes random time from the CPU clock.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In .NET, the garbage collector runs when the application is running low on memory or when a generation (typically generation 0) becomes full. It's not triggered by time elapsed (eliminating A), does not run on fixed intervals (eliminating B), and is not truly random (eliminating D). The CLR manages GC based on memory pressure and allocation patterns.