Bumpity Bump
FrozenFire49 wrote:
How would I clean up all temporary programs if it runs on temporary programs the entire time (det(11,2 would cause the program to delete itself). Would I have to open up a non-temporary program in RAM to delete the other files? Then how would I re-archive that program?
Your main program, the one that Doors CSE launches and takes care of copying all the other programs to RAM, should be the one that cleans them all up before returning itself.
Random memory errors: You have a memory leak.
KermMartian wrote:
Random memory errors: You have a memory leak.
I know these are noobish questions, but what is a memory leak and how do I prevent one from occurring?
A memory leak occurs when you GENERALLY Goto out of an If/Then statement or any statement that ends with End. This also happens when you repeatedly Lbl/Goto the same Lbl.
ordelore wrote:
A memory leak occurs when you GENERALLY Goto out of an If/Then statement or any statement that ends with End.
Correct. Quote:
This also happens when you repeatedly Lbl/Goto the same Lbl.
Wrong. KermMartian wrote:
FrozenFire49 wrote:
How would I clean up all temporary programs if it runs on temporary programs the entire time (det(11,2 would cause the program to delete itself). Would I have to open up a non-temporary program in RAM to delete the other files? Then how would I re-archive that program?
Your main program, the one that Doors CSE launches and takes care of copying all the other programs to RAM, should be the one that cleans them all up before returning itself. FrozenFire49 wrote:
So would I have to rearrange the code, or can I simply free up some more RAM?
As discussed on SAX, I'll see what I can do from freeing up RAM, and see if errors still commonly occur.
As for future reference, would fixing the code be as simple as putting the gotos in ":If 1 :Then" loops?[/code]
FrozenFire49 wrote:
As for future reference, would fixing the code be as simple as putting the gotos in ":If 1 :Then" loops?[/code]
No, that'll just make it go one level deeper. You need to make it one level shallower. The trick is to just not use Gotos inside any kind of looping or multi-line conditional structure anyway. If you can post some simplified examples of where you're leaking memory in your programs, I and/or others would be more than happy to show you how you can repair it. Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
» Goto page Previous 1, 2
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 2 of 2
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement