Computer Science Canada Moving a pic, program crashes after a while |
Author: | riveryu [ 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. |
Author: | Clayton [ 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. |
Author: | BigBear [ 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. |
Author: | Tony [ 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. |
Author: | riveryu [ 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 |