Closed pavellishin closed 5 years ago
In your example banana
and multiplicand
are allocated on the stack and freed (popped) when the function exits.
In Pixelblaze's language, arrays and functions are passed by reference, everything else is a primitive number and passed by value.
The language is es6 in syntax, but a limited subset of functionality is supported, and all numbers are 16.16 fixed point. It is compiled to a mostly static memory model, with the exception that arrays are dynamically created, but there is no GC yet.
I have a few questions about how garbage collection and memory management works in functions.
When I do something like
banana
inside the function?multiplicand
inside the function?