
Highly Technical Question
You should be able to determine this using the Varptr function for the first
element of the array before and after the redim (preserve ??). My
recollection is that VB maintains contiguous arrays and that REDIM is very
inefficient. The article mentioned in the previous post covers both arrays
and strings. (I also recall a similar article on collections which showed
that you could write a collections class in VB which is more efficient than
using native VB collections! )
/Ian
http://storrs.home.ml.org
Quote:
>Chris,
>Indeed, I found your suggestion very informative and generally helpful.
>However, I am asking about the implementation of dynamic array storage, not
>about the storage of strings (either in arrays or not). Also, I'm not
>necessarily always using dynamic arrays for strings. Many times, I am
>holding pointers to objects, complex nested user types, etc...
>So again I ask,
>"When using 'dynamic arrays' in VB, does VB intelligently use pointers
>under the hood in a fashion similar to a C/C++ linked lists implementation
>or does it allocate contiguous space (a potential nightmare when dealing
>with an unknown large amount of data at runtime)? This makes a world of
>difference when Redimming a thousand times..."
>Thanks for any help,
>Shawn Woods