Does ReDim Preserve cause memory reallocation?
The original array has 1000 members, if you want to change it to 998.
Should not re-allocate all the memory?
What if it is changed to 1002?
The original array has 1000 members, if you want to change it to 998.
Should not re-allocate all the memory?
What if it is changed to 1002?
Code:
dim Buffer() as byte
redim buffer(999)
'for next buffer=**
ReDim Preserve buffer(990)
ReDim Preserve buffer(1010)