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
If ReprCString is analogous to Rust's String and owns its own memory, it needs a drop method just like CVec. As it is currently, passing ReprCString to the C side will leak because it has no way to free the string.
The text was updated successfully, but these errors were encountered:
This is true, thanks for reporting! Generally it's a bit tricky, because it's meant to kind of mimic regular C char * strings, so I'm not set whether it's a good idea to add a drop with each string, or make sure each string is allocated with malloc.
If
ReprCString
is analogous to Rust'sString
and owns its own memory, it needs a drop method just likeCVec
. As it is currently, passingReprCString
to the C side will leak because it has no way to free the string.The text was updated successfully, but these errors were encountered: