What is the Dispose method in Visual Basic
What is the Dispose method in Visual Basic and explain it with example ?
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
Gary6 reputationPosted Feb 24, 2011, 4:55 AM EST
If frmSettings.ShowDialog = Windows.Forms.DialogResult.OK Then
'do Something
End If
frmSettings.Close()
frmSettings.Dispose()
Here is a good starting point for further reading.
http://madgeek.com/Articles/Leaks/Leaks.en.html
Also Google- Dispose .net
Martin van Eerde22 reputationPosted Mar 14, 2011, 3:35 AM EDT
http://msdn.microsoft.com/en-us/library/system.idisposable.dispose(v=VS.80).aspx