A storage instance is a particular occurrence of storage associated with an object declaration or function invocation. Recursive calls can create separate instances of the same declared variable, so each call in the recursion hierarchy has its own occurrence. section 13.0
Keep the storage instance distinct from the other layers of a C object:
- An object combines storage, type, and value; a storage instance identifies the underlying occurrence of storage. section 12.4
- Object lifetime and identifier visibility depend on how the object is declared, while recursive declarations can produce multiple storage instances. section 13.0
- Dynamic allocation creates storage instances initially seen only as byte arrays; they acquire an object type when a value is stored. section 13.0
Recursive calls and allocated storage
Imagine a recursive function whose declaration includes a variable. Each active call has its own storage instance for that variable, rather than sharing one occurrence. Separately, dynamically allocated storage begins as a byte array without object interpretation and becomes associated with an object when a value is stored. section 13.0
