#How to free Exec result?
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
std.ChildProcess.exec returns a result which includes owned slices. and I get a memory leak detected because of it.
How am supposed to free stdout and stderr owned slices of that?
you'd free with the same allocator you provided
so if you used allocator allocator in exec you'd free the result.stdout/stderr with that allocator
oh yeaa, is this fine?
allocator.free(result.stdout);
allocator.free(result.stderr);
yep!