Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Moving a pic, program crashes after a while
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
riveryu




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: 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.
BigBear




PostPosted: 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.
Tony




PostPosted: 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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
riveryu




PostPosted: Sun Feb 24, 2008 3:45 pm   Post subject: Re: Moving a pic, program crashes after a while

It worked with Pic.New Very Happy .
MY CREATION IS COMPLETE, ITS ALIVE and STAYS ALIVE.

Thx guys
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: