Aufräumen
Module GCDemo
Sub Main()
Dim i As Integer
For i = 0 To 500
Dim d As New vol(i)
Next
Console.ReadLine()
End Sub
End Module
Class vol
Private num As Integer
Private vol As String
Public Sub New(ByVal n As Integer)
num = n
vol = Strings.StrDup(25000, "X"c)
End Sub
Protected Overrides Sub finalize()
Console.WriteLine("{0} aufgeräumt", num)
End Sub
End Class
|