Is it possible to start Atom's node with --expose-gc


#1

I am trying to write an apm test to test for memory leaks. I would like to use global.gc(), but apparently you have to start Node with the --expose-gc flag in order to do this.

Does anyone know where this happens in Atom? Even if I have to build from source for now to make this happen, that would be fine.


#2

Change https://github.com/atom/atom/blob/master/src/browser/atom-application.coffee#L142

app.commandLine.appendSwitch 'js-flags', '--harmony --expose-gc'

#3

Thanks @postcasio, that’s definitely the right spot.

Unfortunately, it turns out that this is not on the path of the problem I was ultimately trying to solve: