GC.Collect, Dispose and Destructor

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<p align=left><font face=Tahoma color="#3366ff Hello Experts.</font>
<p align=left><font face=Tahoma color="#3366ff </font> 
<font face=Tahoma color="#3366ff I have an unmanaged confusion on the way these three work.(GC.Collect, Dispose and Destructor)</font>
<p align=left><font face=Tahoma color="#3366ff 1. What is the sequence of calls to these three? Means which one is called when? (in terms of Garbage Collection and scope of the code)</font>
<p align=left><font face=Tahoma color="#3366ff 2. Which part of it handles resources related Unmanaged Code and how can I access the unmanaged references? </font>
<p align=left><font face=Tahoma color="#3366ff 3. Which is the best practice (I know it depends on the kind of application we are developing, but which is the better option) - Dispose design pattern might be a good starting point, but I would like to know from experts.</font>
<p align=left><font face=Tahoma color="#3366ff 4. If we have GC.Collect, Dispose, Garbage Collection etc then when will we be using the destructor?</font>
<p align=left><font face=Tahoma color="#3366ff </font> 
<p align=left><font face=Tahoma color="#3366ff I can find links to each of them seperately but not a link which gives you a comparison of these.</font>

View the full article
 
Back
Top