Skip to content
Advertisement

Tag: stack-memory

Javascript closures on heap or stack?

Where does JavaScript (according to the standard) store closures: heap or stack? Is there a third explicit place for closures? Answer In the end it is an implementation detail of the runtime. See Phoenix link As to implementations, for storing local variables after the context is destroyed, the stack-based implementation is not fit any more (because it contradicts the definition

Advertisement