Memory leak on processing stereoscopic video frame, makeMutablePixelBuffer()

Hi, I downloaded and ran https://developer.apple.com/documentation/realitykit/rendering-stereoscopic-video-with-realitykit and noticed that memory usage grows linearly. I replaced the sample video with a different 8k side by side video, and the app crashed almost immediately due to memory leak. it looks like the culprit is from makeMutablePixelBuffer() function and the allocated pixelBuffers are not recycled after being used. screenshot is from a physical device.

"Rendering stereoscopic video with RealityKit" sample project has been updated (around March 2026) to better respond to back pressure observed when rendering such high-resolution, high-framerate content and thus avoid the out-of-memory issue observed with the initial version of the sample project. Please try the updated sample project and to check if the change resolves your issue.

Memory leak on processing stereoscopic video frame, makeMutablePixelBuffer()
 
 
Q