J
James
Hi,
I need help with a couple of questions, I have create and structure like:
Structure byteArray
Public byteA() As Byte
End Structure
Public ptrArray() As byteArray
I have redim ptrArray(1000000) and the memory usage in Windows Task Manager
shows an increase of 4MB bytes that seems OK.
Then I have done
for intI=1 to 1000000
Redim ptrArray(intI).byteA(1)
next intI
And now the memory in task manager shows and increase of almost 16 MB,
instead of 1MB.
QUESTIONS:
1) It seems that an structure increase the memory usage (I suppose it create
internal variables). Is there any other way that I can have an "Array of
Arrays" that can be dinamically increase without the memory overcost of
using a structure?.
2) Is ther any way (not Windows Task Manager) to know how much memory a
variable, or structure is using in vb.net?.
Thanks,
James
I need help with a couple of questions, I have create and structure like:
Structure byteArray
Public byteA() As Byte
End Structure
Public ptrArray() As byteArray
I have redim ptrArray(1000000) and the memory usage in Windows Task Manager
shows an increase of 4MB bytes that seems OK.
Then I have done
for intI=1 to 1000000
Redim ptrArray(intI).byteA(1)
next intI
And now the memory in task manager shows and increase of almost 16 MB,
instead of 1MB.
QUESTIONS:
1) It seems that an structure increase the memory usage (I suppose it create
internal variables). Is there any other way that I can have an "Array of
Arrays" that can be dinamically increase without the memory overcost of
using a structure?.
2) Is ther any way (not Windows Task Manager) to know how much memory a
variable, or structure is using in vb.net?.
Thanks,
James