You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
19
What operating system are you using?
Other (specify below)
Operating System Version
macOS
What arch are you using?
Other (specify below)
Last Known Working Electron version
No response
Expected Behavior
The global content client should init once on startup.
Actual Behavior
The global content client will init twice on the startup and it cause a memory leak.causes.
Testcase Gist URL
No response
Additional Information
These days I try to debug the electron source and found that the global content client will init twice on startup because the ElectronMainDelegate didn't override the CreateContentClient.
The first time, it call the ContentMainDelegate::CreateContentClient to create an ContentClient instance.
netflt
changed the title
[Bug]: The global content client will inite twice on the startup
[Bug]: The global content client will init twice on the startup
Oct 6, 2022
Preflight Checklist
Electron Version
19
What operating system are you using?
Other (specify below)
Operating System Version
macOS
What arch are you using?
Other (specify below)
Last Known Working Electron version
No response
Expected Behavior
The global content client should init once on startup.
Actual Behavior
The global content client will init twice on the startup and it cause a memory leak.causes.
Testcase Gist URL
No response
Additional Information
These days I try to debug the electron source and found that the global content client will init twice on startup because the ElectronMainDelegate didn't override the CreateContentClient.
The first time, it call the
ContentMainDelegate::CreateContentClient
to create an ContentClient instance.Then the global ContentClient will be set as an ElectronContentClient instance in
ElectronMainDelegate::BasicStartupComplete
So the first one is never to be used and never to be free until the process exit.
The text was updated successfully, but these errors were encountered: