Skip to content

Comment on Concurrency in Swift: One possible approachparent

Comments

What leaks? You only get leaks if you have cycles that you forgot or don't close non-memory resources that you keep referencing.

Which is not that different than with a GC.

No, GCs collect reference cycles. Whereas a (strong) reference cycle in ARC in an operation repeated many times in a long-running server or something adds up.

Worse, sometimes, you don't even know if you're creating a leak. For example, I recently had to call, given two gesture recognisers a and b:

a.requireToFail(b)

A is a long-lived object. B goes away when the current view controller is popped. But not if A keeps a strong reference to it. Does it? Probably no one without access to the source code of UIGestureRecognizer knows!

Exactly. How is the profiling experience?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.