-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to expose global.gc()
.
#1213
Comments
v8 related flags can be enabled by https://github.com/atom/atom-shell/blob/master/spec/static/main.js#L9 but it actually didnt expose gc() . is it because v8 was already initialised by gin in libchromium, @zcbenz thoughts ? |
@deepak1556 That code is in the specs window. @bolinfest You can use the line referenced by @deepak1556 to expose |
Could someone please elaborate on how to actually expose global.gc() in Electron? The link above doesn't seem to reference anything useful anymore. |
@bradisbell you need to run Electron with |
This is only about 5 years late, but for posterity the following can be done without any command line args. The "--expose-gc" command line argument is implied in the first command.
|
Node accepts the
--expose-gc
flag to makeglobal.gc()
available. I am trying to write some tests usingWeakMap
to see if I have memory leaks, so having access toglobal.gc()
would be really useful.Is there any way to enable this today and/or how hard would it be to add?
The text was updated successfully, but these errors were encountered: