Skip to content

naugtur/node-example-heapdump

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Heap Snapshot exercise

Prepare

Before you try the exercises, please run

npm install

Note, some of the dependencies there are pinned to old versions so that they produce the memory leak you are here to find.

Getting a heap snapshot

Finding a real issue

Now let's look at a real case of a memory leak. Still a pretty naive one, but one that at least looks realistically.

  • Run npm run real
  • Open http://localhost:8080
  • Get two heap snapshots
  • Find the leak, trace it to a properly named object that you can find, locate the code responsible for leaking (or at least the file).

Spoilers

If you're ready to give up, try again and then look at spoilers.txt

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published