If you use std.testing.allocator, the test runner will detect memory leaks and print stack traces. But memory is not the only resource. You can leak in other ways:
Call openFile, but never call File.close
Call process.Child.spawn, but never call kill or wait
Call Thread.spawn, but never call join or detach
Call myUserCodeStart, but never call myUserCodeEnd
Does Zig have any way to sanitize for these kinds of leaks?
I think this might make it so that we can do similar detection, for some of those other resources:
But the last one seems like it would require some sort of custom validation tooling, or adding support for validation, unless you also invent some sort of interface convention for your myUserCodeStart functions.