Swift: how to remove the number of objects from the system?

Is there a way to quickly get out of accounting for the number of objects in the Xcode console? If not, what is the next best alternative?

+7
reference ios iphone swift
source share
2 answers

using the function CFGetRetainCount

Example:

 print(CFGetRetainCount(object)) 

More details here: https://developer.apple.com/reference/corefoundation/1521288-cfgetretaincount

hope for help

+15
source share

Usually you should use tools to get a save account. But as an answer, here is the retainCount method.

How to get NSObject reference account?

+1
source share

All Articles