Results 1 to 3 of 3

Thread: Save some memory

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    ja
    Posts
    82

    Unhappy Save some memory

    I have notised that when i run my application in win 98 it takes to much memory. Sometimes i get the "Out of memory" error. If i try to run other programs while my application is running i get an error message like "There is not enough memory to run this program".

    My application works fine with win200 and winxp, but not on win98 even tho i have 512 mb of ram.
    My compiled EXE-file is about 2,3 mb and contains about 1800 controls. I have 80 pictureboxes that i use as containers to the other controls. I also use the pictureboxes to display a backgroundimage, if the user wants that (thats why i´m not using frames).

    I belive that it is the pictureboxes that takes up most of the memory, and if i would make about 10 arrays of them, could that save a few mb of memory?

    Maybe i should mention that 1241 of those controls is arrays of labels
    Last edited by john42; Mar 26th, 2005 at 02:53 AM.
    Hej på dej!

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Save some memory

    Quote Originally Posted by john42
    ... My compiled EXE-file is about 2,3 mb and contains about 1800 controls. I have 80 pictureboxes that i use as containers to the other controls. I also use the pictureboxes to display a backgroundimage, if the user wants that (thats why i´m not using frames). ...
    Man, sounds like a real killer app ... You may want to reconsider your design - use control arrays, create new controls/containers/etc at runtime, load images only when necessary and unload then when you done ... and so on and so forth ...
    1800 controls ... 80 pictureboxes ... common ...

  3. #3
    Fanatic Member ZeBula8's Avatar
    Join Date
    Oct 2002
    Posts
    548

    Re: Save some memory

    you have what we call "load-over-trol" -


    You may want to re-think your design as RhinoBull also suggests...

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