140 questions for “Garbage Collection”

Found in 1 field. Select a question to see its full answer.

Information Technology

140 questions in 8 technologies

#QuestionTechnologyTopicLevel
1What does it mean for an object to be 'eligible for garbage collection' in terms of reachability from GC roots? Java › Garbage CollectionJavaGarbage CollectionBeginner
2What is garbage collection in the JVM, and what fundamental problem does it solve compared to manual memory management (like in C/C++)? Java › Garbage CollectionJavaGarbage CollectionBeginner
3What are the four types of references in java.lang.ref (strong, soft, weak, phantom), and how does each affect an object's eligibility for garbage collection? Java › Garbage CollectionJavaGarbage CollectionIntermediate
4What is the difference between a stop-the-world (STW) GC pause and a concurrent GC phase, and why can't garbage collection be made entirely concurrent with zero pauses? Java › Garbage CollectionJavaGarbage CollectionIntermediate
5How would you diagnose a memory leak in a Java application (where memory usage grows unboundedly despite garbage collection running) using heap dump analysis, and what common patterns cause 'leaks' in a garbage-collected language? Java › Garbage CollectionJavaGarbage CollectionAdvanced
6How would you determine whether an application is spending an excessive amount of time in garbage collection (GC overhead) relative to actual application work, and what JVM flags or tools help measure and diagnose this? Java › Garbage CollectionJavaGarbage CollectionAdvanced
7How does garbage collection in .NET work, and what three phases does a collection cycle go through? C# › Memory & Garbage CollectionC#Memory & Garbage CollectionBeginner
8How does garbage collection work in .NET? C# › Memory & Garbage CollectionC#Memory & Garbage CollectionBeginner
9What is a memory leak in JavaScript, given that it has automatic garbage collection? JavaScript › Memory Management & Garbage CollectionJavaScriptMemory Management & Garbage CollectionBeginner
10What are .NET's garbage collection 'generations,' and what's the core assumption behind this design? C# › Memory & Garbage CollectionC#Memory & Garbage CollectionBeginner