Can any one give a link or example of Dispose() mithod in C# (Console App or Web App) which is executable and generate output, not a prototype/skeleton?
Thanks
Sandeep
Dispose() Example ?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Sukesh MarlaRank #461 · 5.4K reputationPosted Oct 5, 2012, 8:22 AM EDT
http://msdn.microsoft.com/en-us/library/fs2xkftw.aspx
Now a days almost every unamanaged resource come with dispose method , u have to call it to clear the memory when its no more required.
Take look at this nice article by ShivPrasad Koirala
http://www.codeproject.com/Articles/39246/NET-Best-Practice-No-2-Improve-garbage-collector#Using finalize/destructor leads to more objects in Gen 1 and Gen 2
Check this is correct answer if it helped.