Sounds like a bug, so you should probably report it.If I understand correctly, MTLCaptureDevice and MTLDebugDevice are MTLDevice wrappers used when launching Debugging under Xcode in Debug mode, so the real MTLDevice should be somewhere under the hood of these objects. Looks like they forgot to wrap the MTLDevice propeply in disconnect handling code.Comparing registryID property of MTLDevice should work. I'm pretty sure it is the intended way.