Destructors and GC

1.What are Destructors ?
Destructors are used to destroy the object after they are used. They are denoted by a tilde ~
class A
        ~A()       //destructor

They cannot have return type and take no parameters.

2.When are Destructors called ?

3.In what order destructor is called in a inheritance chain ?
4.Can Structs have destructor ? 
5.Can destructors have access modifiers ?
6.Can you pass parameters to destructors?
7.What is Garbage Collection ?
8. Can you force GC to run?
9.What are the disadvantages of manual memory management?
10.What is the algorithm behind GC?
11.What are diff generations in GC?
12.When is the garbage collector called ?
13.Difference bt  dispose and finalize?
14.How many destructor can a class have ?
15. How do you implement  deterministic destructor ?
16. What is non-deterministic destructor ?
17.Suppose there are 3 process running in .Net Framework. will there be separate GC allocated for each process ?


  1. The best way to destroy an enemy is to make him a friend. See the link below for more info.


  2. I am very happy to visit your site and i did like it. I was able to get some informative topics. keep it up and you can also visit my site for your reference. Thank you and have a good day.