C# Garbage Collector Interview Questions and Answers

Posted by Questpond under C# category on | Points: 350 | Views : 4181
This 1 hour video will walk you through the essential questions with interview perspective on Garbage Collector in C# with code examples -

Question 1 : - Explain Garbage collector (GC)?
Question 2 :- How does Garbage collector know when to clean the objects ?
Question 3 :- Is there a way we can see this Heap memory ?
Question 4 :- Does Garbage collector clean primitive types ?
Question 5 : - Managed vs UnManaged code/objects/resources?
Question 6 :- Can garbage collector clean unmanaged code ?
Question 7 :- Explain Generations ?
Question 8 :- What is GC0,GC1, and GC2 ?
Question 9 :- Why do we need Generations ?
Question 10 :- Which is the best place to clean unmanaged objects ?
Question 11 :- How does GC behave when we have a destructor ?
Question 12 :- What do you think about empty destructor ?
Question 13 :- Explain the Dispose Pattern?
Question 14 :- Finalize vs Destructor ?
Question 15 :- What is the use of using keyword ?
Question 16 :- Can you force Garbage collector ?
Question 17 :- Is it a good practice to force GC ?
Question 18:- How can we detect a memory issues ?
Question 19 :- How can we know the exact source of memory issues ?
Question 20 :- What is a memory leak ?
Question 21 :- Can .NET Application have memory leak as we have GC?
Question 22 :- How to detect memory leaks in .NET applications ?
Question 23:- Explain weak and strong references ?
Question 24 :- When will you use weak references ?



Get Questpond videos on discounted price from ITFunda.com.

Comments or Responses

Login to post response