Preflight Checklist
Issue Details
- Electron Version:
- Operating System:
- Last Known Working Electron version:
Expected Behavior
The electron helper process should not eat up memory.

Actual Behavior
An electron helper process eats up memory in a linear way


To Reproduce
Example Repositiory
Here is a minimal reproduction example: https://github.com/HaNdTriX/electron-memory-leak
$ git clone [email protected]:HaNdTriX/electron-memory-leak.git
$ cd electron-memory-leak
$ npm install
$ npm start
After starting the app please take a look at its memory usage.
Code
const { session, app, protocol, BrowserWindow } = require('electron')
const { join } = require('path')
protocol.registerSchemesAsPrivileged([{
scheme: 'atom',
privileges: {
// The following setting
// is causing the memoryleak
standard: true
}
}])
app.on('ready', () => {
session.defaultSession.protocol.registerFileProtocol('atom', (request, callback) => {
callback({
path: join(__dirname, 'index.html')
})
})
mainWindow = new BrowserWindow({
width: 800,
height: 600
})
mainWindow.loadURL(`atom://foobar`)
})
Screenshots
See above...
Additional Information
I've tracked down the bug to registerSchemesAsPrivileged and its standard setting.
Preflight Checklist
Issue Details
Expected Behavior
The electron helper process should not eat up memory.
Actual Behavior
An electron helper process eats up memory in a linear way
To Reproduce
Example Repositiory
Here is a minimal reproduction example: https://github.com/HaNdTriX/electron-memory-leak
After starting the app please take a look at its memory usage.
Code
Screenshots
See above...
Additional Information
I've tracked down the bug to
registerSchemesAsPrivilegedand itsstandardsetting.