-
Notifications
You must be signed in to change notification settings - Fork 11
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
MiniV8 (interface wrapper around OwnedIsolate) memory leak #9
Comments
Thank you for the kind words. Could you write up a minimal reproduction of this issue? Is it perhaps as simple as the following? let mv8 = MiniV8::new();
let func = mv8.create_function(|inv| ...);
drop(mv8); I see a TODO related to memory management in |
@SkylerLipthay thanks for the immediate response; Note in the original issue, if I manually called MiniV8::interface::pop (witch will force dropping |
I have to become re-familiarized with my own code here, it's been a while. It does seem that the scope stack design is excessive. Even if you force drop the When I have more time, I can reproduce the leak and try to come up with a better design. I still have not wrapped my head around the retain cycle issue, which seems to be the fundamental problem. It seems like I was confident with my usage of Meanwhile, I'd greatly appreciate a PR or more details/reproduction, if you have time. Thank you for digging into the code. |
@SkylerLipthay
|
@SkylerLipthay I would love to take your notes on the pr. |
Thank you for the PR, this is what I was hoping for. I appreciate the reproduction notes, too. I'll work on this within the next day and hopefully have a quick resolution and new crate version. I agree this would be a good time to update |
@SkylerLipthay would you consider merging the pr or at least review it, or would on fixing the issue ? |
currently I am trying to embed v8 into my application and you lib provided the most simple ABI, so thanks for the effort.
but in my case I noticed a memory leak tried to debug it & found that
Interface
does not dropOwnedIsolate
even after I dropped theMiniV8
instance; this only happens after usingMiniV8::create_function
.The text was updated successfully, but these errors were encountered: