So, in an ordinary programming language, we have stack and heap.
Reference types such as array gets stored in heap. and the variable which holds the address(pointer) of this array is stored in stack..
Question 1) what about solidity's memory ? when array gets created in memory, does solidity store the pointer of that array in stack ?
Question 2) what about solidity's storage ? I think in this case, since it's persisent, stack doesn't come into play. so where is the pointer of the array(stored in storage) stored ?
Reference types such as array gets stored in heap
- that's wrong. Only dynamic arrays are typically stored on the heap, and even that fact is implementation-dependent and not dictated by the language standard (i.e., whoever implements a compiler can do whatever they choose). – goodvibration Oct 2 '20 at 14:53