I doubt the out of memory issues are related to the battery, unless the battery voltage was sagging enough that it was killing the CC3k without taking out the Espruino, causing it to get confused while piping the data and not properly free the memory.
First thing I'd do is run it off USB and check process.memory() to check for memory leaks, and dump() to try to figure out where it's leaking from, if it's leaking from javascript.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I doubt the out of memory issues are related to the battery, unless the battery voltage was sagging enough that it was killing the CC3k without taking out the Espruino, causing it to get confused while piping the data and not properly free the memory.
First thing I'd do is run it off USB and check process.memory() to check for memory leaks, and dump() to try to figure out where it's leaking from, if it's leaking from javascript.