Hello Everyone,
I have the following issue on Visual Basic 6.
In a default vb program project, I have the following lines in a button event handler:
Private Sub Command1_Click()
On Error Resume Next
Dim Ws As Object
Dim CloneMeas As Object
Dim CloneSubMeas As Object
Dim lMeas As Long
Dim lSubMeas As Long
Set Ws = CreateObject("mm_office.workspace")
For lMeas = 1 To 8
Set CloneMeas = CreateObject("mm_office.measurement")
CloneMeas.Size = 1025
CloneMeas.Complex = True
For lSubMeas = 1 To 250
Set CloneSubMeas = CreateObject("mm_office.measurement")
CloneSubMeas.Size = 1025
CloneSubMeas.Complex = True
CloneMeas.measurements.Add CloneSubMeas
Set CloneSubMeas = Nothing
Next lSubMeas
Ws.measurements.Add CloneMeas
Set coSubMeass = Nothing
Set CloneMeas = Nothing
Next lMeas
MsgBox CStr(Ws.measurements.Count)
Ws.measurements.Removeall
MsgBox CStr(Ws.measurements.Count)
Set Ws = Nothing
End Sub
The objects invoked are implemented in c++ vs6.
When I run the application from vs6, the memory after "Ws.measurements.Removeall" returns to his initial state.
If I run it in compiled version, I then get around 5 mb memory leakage.
What could be the reason ? I have not seen memory leakage and if I run a sample c++ consumer application, it works fine.
This is really crazy.
Do you have already seen something like that? What kind of advise could you post me ?
Thank you very much in advance.
Best regards.
SuperMiQi.