How base class is collected by GC?
<p>I have the following code.</p>

<pre><code>baseclass bc = new derivedclass();
</code></pre>

<p>Will the base class object be created in this case? If yes how will the GC know that it is being used (as it does not have any variable pointing to it)? How does the GC handle this?</p>

<p>EDIT : When I set bc = null, Both the base and derived class destructors are called. If no base object is created, how is it calling base class destructor?</p>

<p>How can the destuctor be called when there is no base object?
This is what MSDN says about destructor : "Destructors are used to destruct instances of classes".</p>
