Rendering animations from Python scripts via `bpy.ops.render.opengl()` did not trigger any of the notifications in the Metal back-end to indicate a frame had been rendered and that the associated resources could be released. This adds a call to GPU_render_step() after each render. For the original asset in the bug report this reduces the high memory watermark from 30gb to 13gb for 500 frames. 13gb is likely still too high and therefore it is likely there are additional leaks that need to be addressed so this should only be considered a partial fix. Authored by Apple: James McCarthy Co-authored-by: James McCarthy <jamesmccarthy@apple.com> Co-authored-by: Clément Foucault <foucault.clem@gmail.com> Pull Request: https://projects.blender.org/blender/blender/pulls/131085