pjmlp a day ago Basically,"CRT debug heap details"https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-...This is why I mention these new languages are expected to bring new tools, not recycle what we already have in C and C++.
kingstnap 2 days ago > However, although the code seemed correct, the debug allocator reported memory leaks during executions> This was an annoying memory leak, which I only discovered thanks to Zig's std.heap.debug_allocator.> After identifying the leak, I tried to simply free the memory allocated in left and right, but doing so caused double freeRelevant: To be a better programmer, write little proofs in your head | https://news.ycombinator.com/item?id=44573409When doing things with memory safety you should have obvious and clear memory allocations matched with deallocations that you prove to yourself are matched.Just vibing memory lifetimes seems super jank.
Basically,
"CRT debug heap details"
https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-...
This is why I mention these new languages are expected to bring new tools, not recycle what we already have in C and C++.
> However, although the code seemed correct, the debug allocator reported memory leaks during executions
> This was an annoying memory leak, which I only discovered thanks to Zig's std.heap.debug_allocator.
> After identifying the leak, I tried to simply free the memory allocated in left and right, but doing so caused double free
Relevant: To be a better programmer, write little proofs in your head | https://news.ycombinator.com/item?id=44573409
When doing things with memory safety you should have obvious and clear memory allocations matched with deallocations that you prove to yourself are matched.
Just vibing memory lifetimes seems super jank.