Profiling Swift with tools, what exactly is _swift_retain_?

I profile the Swift iOS application with tools. A lot of time is spent in

_swift_retain_(swift::HeapObject*) libSwiftCore.dylib

and

_swift_release_(swift::HeapObject*) libSwiftCore.dylib

My code basically creates (and goes out of scope) structures and tuples. I understand that since they are value objects, they are allocated on the stack, so I should not see so many heap actions.

What exactly does _swift_retain_and mean _swift_release_?

+4
source share
1 answer

_swift_retain_ _swift_release_ Swifts (ARC). . stdlib. ARC, , w.r.t. , , , , . , , - ARC .

+1

Source: https://habr.com/ru/post/1623614/


All Articles