26 ms·
You can always use a garbage collecting allocator with Zig, if you're that paranoid anout it.
by TUSF 3y ago
You can always use a garbage collecting allocator with Zig, if you're that paranoid anout it.
- pjmlp 3y agoFor that better use D, Nim, Swift, C#, Go, designed from the ground up with one in mind, and whole ecosystem counts on it, instead of having coloured libraries.
- TUSF 3y agoBy convention, all Zig libraries have functions that take an allocator as input from the user. Your application can use libgc[1] and pass the allocator to any library function you use, and not worry about deallocating afterwards. [0]: https://github.com/linusg/zig-libgc https://github.com/linusg/zig-libgc