Re:Rust FFI: Sending strings to the outside world
by webkike on Sunday May 14, 2017 @12:41PM
(#14336292)
When the program exits memory will be reclaimed by the kernel.
Memory leaks aren't horrible if they don't appear in loops or recursive functions (that is to say the leaked allocations do not grow with the uptime of the program). In this case it's pretty much identical to allocating memory that has the lifetime of the program.
Pretty obvious stuff but it's important to keep in mind.
Re:Rust FFI: Sending strings to the outside world
by wging on Sunday May 14, 2017 @12:44PM
(#14336310)
True, but I'd imagine the primary use case for NodeJS wrapping a Rust binary is a long-lived server process, where I'd expect this to actually matter. (Even on Lambda it might matter, given container reuse.)
... guess it doesn't?