How to take photos at the same time for multiple cameras in pure C++(without blueprint or sth)?

After adding in the pooling system they animate fine. Just getting a GPU crash after a longer capture period.

SaveRenderTargetToFile might be not freeing up memory somewhere causing the VRAM to fill up.