Is this causing memory leaking
In the code above, do I need to manually destroy objects to prevent memory leaking, or the garbage collector will take care of them?
Code:
'Class module
Sub Class_Globals
Type typeDataSet(Rows As List)
Private Dataset As typeDataSet
End Sub
'Initialize
Public Sub Initialize
Dataset.FieldsDescr.Initialize
Dataset.Rows.Initialize
SomeFunction
SomeFunction 'Does this call generates memory leak??
End Sub
Private Sub SomeFunction
Dim i As Long
'Should I iterate through previous rows and destroy??
Dataset.Rows.Initialize
For i = 0 To 9
Dim row(2) As Object
row(0) = i
row(1) = 'test' * i
Dataset.Rows.Add(row)
Next
End Sub
Last edited: Mar 13, 2013
Athanasios A.
---------------------------------
Phones: MTK6575 dual-SIM, iPhone 5S Clone
TV Sticks: MK808, Tronsmart 908 II
Tablets: Ramos i9 Intel CPU, Yuandao N90FHD, Ainol Novo 8 Dream, VMWare Androids