I often see this line in the Stack Trance when trying to track a memory leak in Xcode Instruments:
thunk for @escaping @callee_guaranteed () -> ()
What does it mean? I can't even translate thunk word, not to mention its technical meaning in this context. The full stack trace looks like this:
0 libsystem_malloc.dylib calloc
1 libobjc.A.dylib weak_resize(weak_table_t*, unsigned long)
2 libobjc.A.dylib weak_register_no_lock
3 libobjc.A.dylib objc_storeWeak
4 SpriteKit -[SKNode(setParent) setParent:]
5 SpriteKit -[SKNode insertChild:atIndex:]
6 SpriteKit -[SKNode addChild:]
7 IOSTest PieceNode.setup() /.../PieceNode.swift:66
8 IOSTest LabeledPieceNode.setup() /.../PieceNode.swift:86
9 IOSTest closure #1 in closure #1 in MaskedRectBoardNodeController.maskedRectBoard(_:didFill:with:alongGravity:) /.../MaskedRectBoardNodeController.swift:48
10 IOSTest thunk for @escaping @callee_guaranteed () -> () /.../<compiler-generated>:0
11 libdispatch.dylib _dispatch_call_block_and_release
12 libdispatch.dylib _dispatch_client_callout
13 libdispatch.dylib _dispatch_main_queue_callback_4CF$VARIANT$mp
14 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
15 CoreFoundation __CFRunLoopRun
16 CoreFoundation CFRunLoopRunSpecific
17 GraphicsServices GSEventRunModal
18 UIKitCore UIApplicationMain
19 IOSTest main /.../PauseMediator.swift:13
20 libdyld.dylib start