unowned-references Questions
3
Solved
If I have a closure passed to a function like this:
someFunctionWithTrailingClosure { [weak self] in
anotherFunctionWithTrailingClosure { [weak self] in
self?.doSomething()
}
}
If I declar...
Turpeth asked 3/8, 2016 at 9:6
1
Solved
I'm building a physics engine in Swift. After making some recent additions to the engine and running the benchmarking tests I noticed the performance was drastically slower. For example, in the scr...
Marylinmarylinda asked 31/10, 2019 at 0:13
1
Is it true that ARC keeps a count of unowned references to an object?
So, if the strong reference count of an object reaches 0 and the unowned reference count of that object is > 0 the object is d...
Cherokee asked 22/2, 2019 at 23:47
1
Solved
Please read the question to the end as it seems to be the duplicate of many similar others but it is not. Most of the other questions use closures with let keyword to capture weak or unowned self b...
Quintillion asked 29/8, 2017 at 13:54
2
Since the shared singleton instance will always be around, can we safely use [unowned self] in all closures within that singleton class?
Hudspeth asked 29/5, 2015 at 2:44
1
© 2022 - 2024 — McMap. All rights reserved.