Memory leaks in Apple sample code

I have used Instruments' Leaks profiler on the Apple's "HelloTriangle.app" sample code. I can see a lot of memory leaks, most of them happen in

-[AAPLRenderer drawInMTKView:]

and are related to allocating the command buffer and presenting drawables.


What could be the reason and how to fix these leaks. Or is it bugs in Metal SDK itself?