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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sukesh MarlaPosted Oct 5, 2012, 12:22 PM
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.