you can use lite-c just like c-script if you want (big fixed size global arrays instead of malloc() and so on ). then you won't have memory leaks.