top | item 34972625

(no title)

tomck | 3 years ago

You can tell when, because if it uses the allocator it will return an error. So the first line definitely doesn't allocate, and the second definitely does.

That is, unless you explicitly handle OOM conditions inside your construct, e.g. 'crash if you're OOM', which isn't typical in zig code. All code I interact with will return an allocator error if allocation fails.

discuss

order

No comments yet.