0
Does the storage binding (related to the variable’s lifetime) allow static variables? Allows dynamic variables of heap?
0
Does the storage binding (related to the variable’s lifetime) allow static variables? Allows dynamic variables of heap?
2
There are some definitions of what would be static variable. Lua has no static variable mechanism, but is powerful and flexible to get the same result through other mechanisms.
By default values are placed on heap through dynamic allocation and variables can point to these values. You use local
to switch to automatic allocation in stack.
Browser other questions tagged variables lua memory-management lifespan
You are not signed in. Login or sign up in order to post.
Thanks for your help!
– A L