Zig Allocation Patterns

Zig Allocation Patterns A reference for the allocation and ownership patterns used in porcupine-zig , plus the broader landscape of Zig allocator idioms. Examples cite types and functions in the codebase by name so the patterns can be grounded against real code. But the discussion in this post stands on its own and does not require reading those sources. 1. The two ownership models: aware vs. owning Both patterns satisfy the project rule "every allocating function takes an explicit std.mem.Allocator ." The

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论