I'm using a library that doesn't free up all memory when the program is stopped. As a result I get an ENOMEM exception when restarting the program. Is there a way to free all RAM memory upon program restart?
For now I'm using hard-reset as a work-around, but I'd like to be able to just stop and restart the program and have it clean up the RAM at startup. Something like: clean_ram()
. clean_ram()
would force the garbage collector to free all allocated memory.