How to deallocate a returned string from Javascript? #21903
Unanswered
begilbert-sys
asked this question in
Q&A
Replies: 1 comment
-
I don't believe that is possible with Perhaps you could restructure your code so that it returns a pointers to fixed location that gets freed on the next call:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following function in C++:
Which I then call from JS like so:
Module.ccall("solve", "string", ["string"], ["insert string here"])
There is of course a memory leak because the returned char array never gets deallocated. But I'm unsure of how to deallocate that memory from JS.
Beta Was this translation helpful? Give feedback.
All reactions