![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello all,
I have a program that uses a few bitmap objects. I see that the program keeps on allocating memory as it runs. When I change the bitmaps I call the New methods again. So the question is do the new methods allocate new object memory each time or does it just reinitialize the object and it's memory. I've been under the impression that it just reinitializes the object. Should I be just changing the .value method and avoid calling New over and over. This goes for all objects actually. Thanks |
|
|||
|
Hi Erel,
Yes eventually I get a out of memory exception. I can see that the memory allocated by the program steadily increases. The gccollect method helps but the allocated memory still increases. I have three bitmaps objects that I continually use in the program. The bitmap continually get changed. At the moment I call new each time I need to change the bitmaps. The bitmap is "on" the screen when new is called. I don't create any additional bitmap objects just reuse the three I already have. So, if I follow, because the bitmaps are being used/referenced in the program a dispose and addobject is needed to free all memory. Is this advice for all other objects as well? Thanks |
|
|||
|
In some places I load the image from a file. To use the value method it seems to me that I need to then make a imagelist but I don't particularly care to do this because the images are background images and can be many. I can try just to see the result.
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DateTime compatibility methods | berndgoedecke | Basic4ppc Wishlist | 4 | 08-31-2008 06:43 PM |
| Build proper desktop apps in B4PPC with this awesome Forms library | agraham | Additional Libraries | 25 | 07-30-2008 05:19 PM |
| Out of Memory Exception Error on Load | willisgt | Questions & Help Needed | 9 | 03-01-2008 12:18 PM |
| out-of-memory-error based on timer after switching to V6 | Frank | Questions & Help Needed | 2 | 01-17-2008 04:26 PM |
| Out of Memory error while loading bitmap | HARRY | Questions & Help Needed | 3 | 05-15-2007 01:12 PM |