@dougr1988
Photoshop does not release memory when you close a file. That memory is reused and recycled for the next file you open.
This is, in fact, what makes batch processing possible and workable in the first place. Requesting memory from the operating system for every file, would be very slow and inefficient.
The memory is released when Photoshop exits.
Then only thing you need to watch when running large batches, is that each file is closed before the new one is opened. If not, the whole system will choke quickly, not just from exhausted memory, but also scratch files growing without check.
Now, there is one more element to this: the GPU. The GPU uses large amounts of memory itself, performing tasks called by Photoshop. This is normally allocated by the OS, but there is a possibility of conflicts. Specifically, we’ve seen quite a few cases where corrupt preferences causes the GPU to eat up memory unchecked. This can especially be a potential problem with systems that have an integrated GPU that uses shared system memory, or dual GPUs, like most laptops.
To be clear, this is not normal behavior when it happens, and most of us never see it. But those who do, usually report back that a complete reset of preferences fixed it. So always try that first.
I understand the frustration when things don’t behave as you expect, but in this case it can probably be remedied easily.