3 ms·
Well yeah, it's in Zig, not a memory-safe language, so of course I'd expect memory leaks. That's why I haven't seriously used bun and instead use a runtime that
by satvikpendem 6mo ago
Well yeah, it's in Zig, not a memory-safe language, so of course I'd expect memory leaks. That's why I haven't seriously used bun and instead use a runtime that actually is in a memory-safe language, Deno in Rust. It's like wearing roller skates without brakes and wondering why you keep running into things.
- LinusU 6mo agoMemory safety has nothing to do with memory leaks, and it's perfectly valid to leak memory in Rust? e.g. `Box::leak(Box::new( ... ))`
- nicoburns 6mo agoMemory safety doesn't help too much here, but "RAII" (automatically dropping values when they go out of scope) does.
- satvikpendem 6mo agoGenerally it's automatically dropped unless you go out of your way to use the leak function, which most software doesn't do.
- deleted 6mo ago[deleted]
- bnolsen 6mo agoUnit tests in zig will fail if the tested code leaks memory.