Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1448

Does VB6 ReDim Preserve cause memory reallocation?

$
0
0
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?

Code:

dim Buffer() as byte
redim buffer(999)
'for next buffer=**

ReDim Preserve buffer(990)

ReDim Preserve buffer(1010)


Viewing all articles
Browse latest Browse all 1448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>