From MSDN : -
A memory leak occurs when memory is allocated in a program and never returned to the operating system, even if the program does not use memory anymore. The four main types of memory leaks are listed below:
- : . . , , .
- : , , . , . , .
- : , . , , , .
- : , . .
Dim DS As DataSet
Dim cn As New SqlClient.SqlConnection("data source=localhost;initial catalog=Northwind;integrated security=SSPI")
cn.Open()
Dim da As New SqlClient.SqlDataAdapter("Select * from Employees", cn)
Dim i As Integer
DS = New DataSet()
For i = 0 To 1000
da.Fill(DS, "Table" + i.ToString)
Next
, , (, DataSet), , , , , , , , , .
: -
.NET , , , . , , GC .