I would like to note that this guide is also a bit outdated. Recently the GPA was renamed to DebugAllocator and a new faster general purpose allocator std.heap.smp_allocator
was introduced which, according to investigate SmpAllocator performance with respect to other popular allocators · Issue #12484 · ziglang/zig · GitHub, seems to be faster than the libc allocator, so that advice is likely obsolete.
Every time you want to free data in another thread than it is allocated. For example if you have a thread pool that consumes heap-allocated task data that needs to be freed after the task is finished.
Also note that the DebugAllocator is thread-safe by default, so you don’t even have to think about this most of the time.