Illustration only Photo by Peter Ivey-Hansen on Unsplash
Zig std.ArrayList gains lockPointers and unlockPointers to panic on invalidated element pointers during growth
Why it matters — Without this, storing pointers into an ArrayList's backing memory and then growing the list causes silent memory corruption that is difficult to debug. With lockPointers, the program panics with a stack trace at the point of violation instead, making the bug immediately visible.