-
Notifications
You must be signed in to change notification settings - Fork 20
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
[bug?] a memory leak? #155
Comments
Good question... There was a CleanUp process in the old bindings. Perhaps the new ones are missing that clean step. |
I could be wrong, but it's my understanding that NAPI manages all the Are strings causing an actual problem? |
I'm also really not an expert when it comes to working with memory in C but looking at it now, this probably does leak? The way the bindings are supposed to look, the string itself should be okay to discard once the function its used for is done (and it wouldnt affect anything the user has saved in JS, its just a copy). So we probably need to add another condition to the code generator for functions with string arguments:
I'm just not sure personally what it looks like to free that memory, i basically only know enough about C to have gotten the bindings to compile... |
Maybe a first step is to verify our idea of this (as we disagree on if it's a leak or not.) How do we determine it is? This seems like it might help detect them. So, what is the test for it? Do we run a bunch of node-raylib functions that pass strings, and see if we hit a leak? |
node-raylib/tools/generate_templates/node-raylib-bindings.js
Line 222 in 4887ee1
I might be missing something, but I didn't see any place that does free it, is not that a memory leak?
The text was updated successfully, but these errors were encountered: