If I had a large string array MyArray(999999,10) and initially only use a few of the elements scattered through the range I notice it only takes up a much smaller use of available memory than if I put data in every element.
My question is, when I dimension the string, is VB6 reserving a 255 byte space for every possible future element or does it only reserve a pointer to where future elements might be so that elements might end up scattered throughout memory?
The reason for this question is I am looking for the fastest way of adding to and searching about 2000 items in a relatively large array without exhausting the available memory. (Items with 6 digit Serial numbers)
My question is, when I dimension the string, is VB6 reserving a 255 byte space for every possible future element or does it only reserve a pointer to where future elements might be so that elements might end up scattered throughout memory?
The reason for this question is I am looking for the fastest way of adding to and searching about 2000 items in a relatively large array without exhausting the available memory. (Items with 6 digit Serial numbers)