Skip to main content
Sign in Register
Question no. 91277

At what point does the Garbage collector execute ?

Select your answer for: At what point does the Garbage collector execute ?
Show answer

Answer: C. When application is running low of memory

Explanation

The .NET Garbage Collector automatically executes when the system encounters low memory conditions. This reclamation process frees unused managed objects to optimize heap memory allocation. Option C is correct because low memory pressure triggers garbage collection execution. Garbage collection provides automatic memory management for managed applications in .NET. The runtime allocates objects on the managed heap and cleans them up when no references remain. Generational garbage collection optimizes performance by collecting short-lived objects frequently.

Enterprise applications benefit from automatic memory cleanup, reducing critical memory leak risks. Developers should still dispose of unmanaged resources manually despite automatic garbage collection. Understanding memory pressure triggers helps engineers write high-performing scalable software. Option A is incorrect because garbage collection runs deterministically based on memory thresholds. Option B is wrong since collection is driven by resource consumption rather than time intervals. Option D is incorrect because the low memory trigger accurately explains the mechanism.

Topic
—
Difficulty
medium

Related questions

Q1. What is the lifespan of items stored within ViewState______________?

Select your answer for: What is the lifespan of items stored within ViewState______________?
Show answer

Answer: D. Exists for the Life of the current page

ViewState items exist exclusively for the lifespan of the current web page request cycle. It serializes control state into hidden form fields passed back and forth during postbacks. Once the user navigates away from the...

Q2. What type of executable unit is generated upon building an ASP.Net application ?

Select your answer for: What type of executable unit is generated upon building an ASP.Net application ?
Show answer

Answer: C. . DLL

Aspnet source files are compiled into dynamic link libraries containing intermediate language bytecode during building processes. The build system packages compiled code components into standard assembly files for effici...

Q3. Which section of the config.Web file holds the list of authorized users ?

Select your answer for: Which section of the config.Web file holds the list of authorized users ?
Show answer

Answer: C. authorization

The authorization section in the Web.config file holds the list of authorized users and access rules. It specifies which users or roles are granted or denied access to specific folders and resources. The correct option c...

Q4. At what point in the lifecycle is user control code executed______________?

Select your answer for: At what point in the lifecycle is user control code executed______________?
Show answer

Answer: A. After the webform loads

User control lifecycle events are nested within the page lifecycle; they typically initialize and load after the page's corresponding events.