Results 1 to 5 of 5

Thread: Memory Usage

  1. #1

    Thread Starter
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349

    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?
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    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...
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3

    Thread Starter
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349
    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.
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

  4. #4
    Fanatic Member skald2k's Avatar
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    535
    Do you have any infinite loops or massively enormous arrays?
    - If at first you dont succeed, then give up, cause you will never will!

  5. #5

    Thread Starter
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349
    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.
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width