Hello
Do we need use garbage collector every time when we create unmanaged resources?
Thanks.
Garbage collector for unmanaged resources.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
SenthilkumarRank #387 · 6.5K reputationPosted Mar 24, 2012, 6:15 PM EDT
The Garbage collection has implemented to manage the auto memory management of manage code, basically it handles the code which runs under the environment of CLR.
I suggest you to go through this example will give more idea about cleaning up unmanaged resources.
http://www.gibmonks.com/c_sharp/csharpckbk2-CHP-3-SECT-31.html
VulpesRank #55 · 29.2K reputationPosted Mar 24, 2012, 3:35 AM EDT
http://msdn.microsoft.com/en-us/library/system.idisposable.aspx