top | item 26418834

(no title)

z92 | 5 years ago

Checked Zig. Doesn't have a memory manager. It's "free all at program termination" or manually manage memory like C.

discuss

order

socialdemocrat|5 years ago

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.

anderspitman|5 years ago

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