-
Memory Usage
Hi All. I have a question about the use of memory in vb when you call methods from other forms.
If i call a function that is located on a form that is not loaded yet, vb will obviously load that form into memory to execute the function, but will it release it from memory so that if i then load that form i will still only have 1 copy of said form in memory, or will i have 2 copies of the form in memory?
-
Well
If you access a function on one form from another, why not set in a module, so all forms can see the function? This would eliminate having to reference at the form level...
-
I've already done that since posting, but it doesn't solve my real problem, which is that i get a runtime error 7 - out of memory error when the computer i am running it on has 425MB RAM and my prog only uses 10-20MB depending on the data that is loaded. I thought that maybe i had too many controls loaded into memory at the same time, but it doesn't look like i did.
-
Do you have any infinite loops or massively enormous arrays?
-
no, biggest array has 24 elements, each element is a string. therefore the biggest loop iterates 24 times. I have checked out the RAM usage for the system. It sits around 9 500Kb when running, it shoots up to 14000-15000KB when i load screens with 24 resized photos, but goes back down when those forms are unloaded. The strange thing is that my system runs it with 13000Kb available RAM while the system that fails has over 300MB RAM available, and gets the error.