4

Sorry if I am asking this in the wrong place, but I just don't know where to ask. So I am debugging the node.js code below:

var leakyArr = [];

var gameLoop = function () {

    leakyArr.push(function leakyFunc() {
        return 'BEST FRIENDS!' + leakyVar;
    });

    var leakyVar = -357;

    setTimeout(gameLoop, 500);

    console.log("1");

};

gameLoop();

When I make two snapshots and then compare them I get following image:

Snapshots comparison

Now can you please help me to find out what each of the numbers means? For example, what this "system / Context" under №1 means? What №2 means and how it is different from №1? I think (hope) that Array @57617 is my leakyArr, is that right? What is №4 and how it is different from №2? What is this №3 "system / Context" again and how it is different from №1? What is №5?

Also, can you give me a link to some documentation or article about all that stuff? I would really appreciate it.

Ruslan Plastun
  • 1,224
  • 2
  • 9
  • 25
  • The [documentation article](https://developers.google.com/web/tools/chrome-devtools/memory-problems/memory-101) is easy to find, not sure it answers all of your questions, though. – wOxxOm Jun 25 '18 at 19:16

0 Answers0