You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One spot where Zig lags behind C compilers in memory safety: returning a pointer to a temporary created in the same scope (specifically when the value is not comptime known)
One spot where Zig lags behind C compilers in memory safety: returning a pointer to a temporary created in the same scope (specifically when the value is not comptime known)
For people new to manual memory management, this is a footgun
In C:
Compile:
In Zig:
Compile:
$ zig build-exe hey.zig # no error
The text was updated successfully, but these errors were encountered: