Understanding Memory Management in Verse: Heap vs. Stack for Variable and Object Allocation

Question:

I’m not clear on how memory is managed for variables or objects in Verse. Does Verse use heap memory, stack memory, or both?

Example:

Suppose I have an array variable in my device that initially contains 1,000 objects. Once I finish working with this array and reinitialize it to an empty array (i.e., array {}), will this action reduce the memory usage, or will it still consider the initial memory allocation of 1,000 units?

2 Likes

It should use both depending on what it does, I’m not sure though, but it also shouldn’t be an issue for you