mirror of
https://codeberg.org/ziglang/zig
synced 2026-03-16 23:21:44 +00:00
When a thread is detached from the main thread, we automatically cleanup any allocated memory. For this we first reset the stack-pointer to the original stack-pointer of the main-thread so we can safely clear the memory which also contains the thread's stack.