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
will always create a new JavaScript proxy object for each invocation. Not only this is wasteful, but also operations such as
fn()===fn()
would not have the expected result.
This problem exists in most languages supported by SWIG.
It can be solved by storing weak references to all returned objects in a hash table indexed by the pointer address.
However there are practical problems with handling the destruction of these objects in JavaScript - namely the V8 delayed destruction which cancels the weak references without immediately destroying the objects.
The text was updated successfully, but these errors were encountered:
Currently the following pattern:
will always create a new JavaScript proxy object for each invocation. Not only this is wasteful, but also operations such as
would not have the expected result.
This problem exists in most languages supported by SWIG.
It can be solved by storing weak references to all returned objects in a hash table indexed by the pointer address.
However there are practical problems with handling the destruction of these objects in JavaScript - namely the V8 delayed destruction which cancels the weak references without immediately destroying the objects.
The text was updated successfully, but these errors were encountered: