Hi there,

I have a large array of class objects to clear and release memory.

Code:
For i = LBound(prp_GTable) To UBound(prp_GTable) - 1
  ReDim Preserve prp_GTable(LBound(prp_GTable) To UBound(prp_GTable) - 1)
Next
GTable is a small class.

The above was originally coded in VB5.
Of course it 'works' in VB6 the same.

But it is ultra slow compared to when it runs under VB5, estimated factor 1000.
I can't imagine what the error could be, as the code is unaltered.

I did a little research, ZeroMemory sounds perfect instead of the loop.
But ZeroMemory doesn't accept GTable - type mismatch.

1)
What could be the cause for acting so much slower in VB6?
This should be a known problem...

2)
In which way could I hand over GTable to ZeroMemory?


Thanks,
Karl