-
Notifications
You must be signed in to change notification settings - Fork 53
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
Weak in electron: works in main, fails in renderer -- why? #86
Comments
To be honest, I'm not really sure about the implementation details of Electron's renderer process, though I know that they do some magic bridging that might be getting in the way. You might need to check with them if there's something special that needs to be done. |
@3n-mb seeing a similar thing. Have you learned anything new in the mean time? |
@martijnthe I have no info about why this happens. But I have a working horrible hack that allows to have weak-like functionality in renderer. It goes like this: Workaround
Electron's rmi has ability to track objects in renderer and react (callback something) when they are gone. May be, one may find in code how it is done, hopefully in js, but the rabbit hole may go all the way to |
The following has been observed.
weak
can be built and used in electron app, as long asimport/require
is done in main process. Ifweak
isrequire
-d in renderer, renderer process crashes when registered object is garbage collected.Why?
And should it work in renderer, or, of cause it shouldn't?
The text was updated successfully, but these errors were encountered: