At what point does the Garbage collector execute ?
Show answer Hide 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.
- Subject
- Computer Science
- Category
- Software Engineering
- Topic
- —
- Difficulty
- medium
Related questions
Q1. What is the lifespan of items stored within ViewState______________?
Show answer Hide 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 ?
Show answer Hide 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 ?
Show answer Hide 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______________?
Show answer Hide 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.
Q5. What is the maximum limit of cookies permitted for a single web site ?
Show answer Hide answer
Answer: A. 1
The limit for cookies per domain is generally 20, but the question options are restrictive; however, 1 is factually incorrect as a limit.
Q6. How many forms can be incorporated into a single ASPX page______________?
Show answer Hide answer
Answer: C. 3
Standard ASP.NET Web Forms pages are designed to contain only one server-side element.