Fix for memory leak
Fix for bug where "IF
This looks good to me. I'm excited to test it out later tonight and see if it resolves issues I've been having running adventure especially on microcontrollers with limited ram. Thanks so much!!!
No problem, thanks for your work on PyBasic! Running code on a microcontroller with limited ram was exactly what tripped me up. This was my first time debugging a memory leak in python and I found guppy3 to be invaluable.
On Mon, Oct 14, 2024 at 11:08 AM RetiredWizard @.***> wrote:
This looks good to me. I'm excited to test it out later tonight and see if it resolves issues I've been having running adventure especially on microcontrollers with limited ram. Thanks so much!!!
— Reply to this email directly, view it on GitHub https://github.com/richpl/PyBasic/pull/67#issuecomment-2411931255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYZFRQ4WUY6KLBINSAMRBTZ3QCCVAVCNFSM6AAAAABP5IO27KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJRHEZTCMRVGU . You are receiving this because you authored the thread.Message ID: @.***>
I tested on a Pico running adventure and was able to play far into the dungeon without a memory crash. Before this update, I would get a memory allocation error on a Pico about a dozen moves into the game.
By the way, if you're running PyBasic on a microcontoller, I created a version that doesn't load the basic program into RAM but runs it directly off the flash. This really makes a big difference in the size of basic programs that will load and run. It runs a little slower and there are a couple of other minor changes but it should be pretty compatible.
Many thanks for this @grwhitehead. It's been a while since I worked on this so I always appreciate someone creating a PR when they've found a bug!