@(test)
test_each :: proc(t: ^testing.T) {
// ---------------------------------------------//
context.allocator = context.temp_allocator
defer free_all(context.temp_allocator)
// ---------------------------------------------//
// Do a bunch of dumb, internal, hidden allocations
results := Test_my_procs()
...
}
// No leaks!
Programmers with Stockholm Syndrome will ignore how convenient this is and just say that I didn’t plan well enough and I shouldn’t prototype before knowing my complete memory model.
You can literally always come up with such an explanation to rationalise any shortcoming.
Instead of rationalising for others, I’ll just enjoy.