Skip to content

Instantly share code, notes, and snippets.

@yetithefoot
Last active December 27, 2020 14:28
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yetithefoot/e466827c7756f6a7a03e to your computer and use it in GitHub Desktop.
Save yetithefoot/e466827c7756f6a7a03e to your computer and use it in GitHub Desktop.
Runs Google Chrome with memory objects
To enable window.gc() on Chrome browser console you just need to start Chrome like this:
> /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --js-flags="--expose-gc" --enable-memory-info
Those flags enable the following console API, very usefull to debug memory leaks:
> console.memory // print memory information
> window.gc() // force garbage collection
@maximal
Copy link

maximal commented May 14, 2014

Что с кавычками? Почему их три?

@yetithefoot
Copy link
Author

=)

@Max-Hab
Copy link

Max-Hab commented Oct 11, 2016

"window.gc()" doesn't work with Chrome 53.0.2785.143. Does somebody know how to force the garbage collection in the latest Chrome?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment