Hacker News new | ask | show | jobs
by z92 1919 days ago
Checked Zig. Doesn't have a memory manager. It's "free all at program termination" or manually manage memory like C.
2 comments

It is much better structured than C. Everything in the standard library that allocated memory takes an allocator as first argument.

And you got cleanup with defer statements. Together this makes the memory management story very different from C.

It does have some nice improvements over C though, such as defer-style deallocation, which can help with many potential bugs.