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
Each context keeps a map of registered callbacks. When the registered callback is called from V8, this map allows the go side of things to actually call the correct callback.
Unfortunately, the code currently has no way of knowing when a particular callback is no longer accessible from the JS, so there's no way to clean up the callback registrations.
This means that registering many callbacks is a source of memory leaks.
A potential solution is to explicitly un-register a callback (deleting it from the context map) and, if a callback comes in for an unregistered entry we just consider it a failure (i.e. throw an error in JS).
The text was updated successfully, but these errors were encountered:
Each context keeps a map of registered callbacks. When the registered callback is called from V8, this map allows the go side of things to actually call the correct callback.
Unfortunately, the code currently has no way of knowing when a particular callback is no longer accessible from the JS, so there's no way to clean up the callback registrations.
This means that registering many callbacks is a source of memory leaks.
A potential solution is to explicitly un-register a callback (deleting it from the context map) and, if a callback comes in for an unregistered entry we just consider it a failure (i.e. throw an error in JS).
The text was updated successfully, but these errors were encountered: