Moving a pic, program crashes after a while
Author |
Message |
riveryu
![](http://compsci.ca/v3/uploads/user_avatars/196991102647ae2debe0bf0.jpg)
|
Posted: Wed Feb 20, 2008 9:30 pm Post subject: Moving a pic, program crashes after a while |
|
|
I made a really simple program moving a picture around the screen in four directions: up, down, left, right
However, if i keep moving the picture for a while(maybe 2 min), the program will crash and say not enough memory. Whats wrong?? My friend said something about seting the frame skip or frame something...or fps... idk. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: Wed Feb 20, 2008 10:35 pm Post subject: RE:Moving a pic, program crashes after a while |
|
|
I'm thinking your problem is you keep creating a new picture every iteration, however, it is difficult to say without actually seeing some code. |
|
|
|
|
![](images/spacer.gif) |
BigBear
|
Posted: Thu Feb 21, 2008 11:05 am Post subject: Re: Moving a pic, program crashes after a while |
|
|
It also depends if you are using Pic.Free ? try setting the variable outside of the loop and not using it. |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Feb 21, 2008 11:37 am Post subject: RE:Moving a pic, program crashes after a while |
|
|
There should be as many Pic.Free as there are Pic.New (count the number of calls in the loops). Turing can keep track of ~1000 pictures in the memory at a time. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
riveryu
![](http://compsci.ca/v3/uploads/user_avatars/196991102647ae2debe0bf0.jpg)
|
Posted: Sun Feb 24, 2008 3:45 pm Post subject: Re: Moving a pic, program crashes after a while |
|
|
It worked with Pic.New .
MY CREATION IS COMPLETE, ITS ALIVE and STAYS ALIVE.
Thx guys |
|
|
|
|
![](images/spacer.gif) |
|
|