CodeWalrus

General => General Help & Troubleshooting => Topic started by: Midnightas on February 05, 2019, 04:54:16 pm

Title: What causes "RAM leaks"?
Post by: Midnightas on February 05, 2019, 04:54:16 pm
I am writing a simple game in ez80 assembly, and every single time I run the program, my calculator's free RAM goes down a lot.
I can run the game maybe 4-5 times before it runs out and a memory error occurs.

Is my program simply not deallocated from memory, if so, how do I get it to?
Title: Re: What causes "RAM leaks"?
Post by: Midnightas on February 07, 2019, 06:07:42 am
It turned out to be me setting IY without saving the old value.
Title: Re: What causes "RAM leaks"?
Post by: rowan_futurerave on February 14, 2019, 09:44:16 pm
I'm not sure about assembler, but in C and C++ memory leaks are caused by using the calloc/malloc routines (in C) or the new operator (in C++) without using corresponding calls to free (in C) or delete (in C++).