What is `swift_getTypeName::TypeNameCache` doing?

In the memory graph debugger I sometimes see multiple instances of my object BluetoothInterface (each has a different address so it seems). The second one always has this strange left hand side reference to it.


Is this normal?
What does this mean?
Is there really an extra instance of my object?
What can I do to check using lldb?

Instruments and Leaks sometimes mistake Swift type metadata objects for instances because the allocations in the cache end up with a pointer to the type metadata in the first word that looks like an isa pointer to heap-walking code that doesn't know anything else about the execution state of the program. Chances are that's what's happening here. Mind filing a Radar?


I would like to file a radar, but I have no idea how to reproduce the issue in smaller project. This seems to happen randomly. I'm currently testing correct deallocation of a single object I add and remove, sometimes the memory graph debugger reports a second instance as shown in the image above, but no idea why. If I could gather more interesting information I would definitely file a bug report.

If I got you correctly in my case this is like a false positive.

Terms of Service

Privacy Policy

Cookie Policy