-
Notifications
You must be signed in to change notification settings - Fork 506
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
Nan context switch issue #549
Comments
Nothing concrete comes to mind. Maybe because of using |
Actually, since it returns |
I refactored it using
But it still returns |
#1 0x00007ffff1832641 in nodeproxy::ProviderProxy::~ProviderProxy() () |
Okay, apparently I fixed it by calling |
It ought to mean that, yes. What you would need to do instead is keep a reference alive on tge javascript side until it is no longer needed, then set it to null or delete it or something, and it will be subsequently garbage collected. On March 27, 2016 4:57:33 PM GMT+03:00, Enerccio notifications@github.com wrote:
|
I thought that it is done automatically with regards it being objectwrap, no? Ie when the object to which this was wrapped has been collected, so should the c++ instance, no? Because the javascript object is definitely NOT being garabage collected. |
The objectwrapped object will not be collected until its js correspondent has been collected. On March 27, 2016 5:43:59 PM GMT+03:00, Enerccio notifications@github.com wrote:
|
But it is, which is why I get all these problems. The underline objectwrapped object is collected, while js correspondent is kept alive and next time it is used, I get segfault or persistents are cleared. |
This makes no sense, how can I get my object garbage collected yet later use it to access my c++ instance?
|
That would seem appropriate, given that it creates a new, separate context. However, there ought to be some way of creating a reference between contexts, but I'm not familiar with how. On March 27, 2016 10:07:13 PM GMT+03:00, Enerccio notifications@github.com wrote:
|
Actually I tested it with separate code using same c++ code:
Which works fine (invoked with |
There have been a number of issues with the vm module (contextify) which have been subsequently fixed. For example, this. Try running node master and see if the problem still is there. |
http://stackoverflow.com/questions/36190856/v8s-persistents-value-changed
Anyone has any idea why does this happen?
The text was updated successfully, but these errors were encountered: