Xcode Instruments, Leaks. Meaning of "thunk for @escaping @callee_guaranted() -> ()" Xcode Instruments, Leaks. Meaning of "thunk for @escaping @callee_guaranted() -> ()" xcode xcode

Xcode Instruments, Leaks. Meaning of "thunk for @escaping @callee_guaranted() -> ()"


A thunk generally is a box around a delayed function call (possibly adding some context, and possibly requiring additional context to complete). In Swift, thunks are generally used to help manage memory or calling conventions around a closure. As a rule, you can ignore the thunk; it's a bit of an implementation detail.

What this is really telling you is that you're leaking an SKNode somewhere, and that SKNode was created in a block dispatched to the main queue (probably using DispatchQueue.main.async). It is highly unlikely that this call stack actually has anything to do with the leak. It's just telling you where the leaked object was created.