Skip to content
Advertisement

Tag: memory

Do get accessors incur a per-instance allocation cost?

Say I have a class defined like this: And then I create several instances like so: Are these get accessors allocated for each instance? That is, would the memory usage of each of those objects increase if I were to add more get accessors, or are the get accessors allocated once and simply shared amongst all the instances? I tried

How does Promise Chaining work in memory?

Console Output: My main question is what is actually happening when the global execution context thread is finished and popped of the execution stack. How does JS/V8 know where this Promise Object is in memory if the Promise Object is not assigned to a variable within global execution context? How does it know where to update the promise value and

Advertisement