@chriseidhof Yeah, so we can check whether the object is still alive before strong-retaining it again.
-
-
@jckarter wait, so as long as there's an unowned ref, memory isn't freed? How does unowned prevent ref cycles then?0 replies 0 retweets 1 like -
@jckarter when A refers B strongly, and B refers A unowned, it still creates a cycle? Because A only is released after unowned releases?0 replies 0 retweets 0 likes -
@chriseidhof The object is destroyed and gives up all its resources when the last strong reference is released.0 replies 2 retweets 3 likes -
@chriseidhof The memory for the instance is still allocated but left in a zombie state.0 replies 1 retweet 3 likes -
@jckarter@chriseidhof just to clarify: does `unowned` behave basically like `assign` in objc?0 replies 0 retweets 0 likes -
@heathborders@chriseidhof The property doesn't keep the object alive, but the runtime still validates access to the dead object.0 replies 0 retweets 1 like -
@jckarter@chriseidhof so if the object is dead when you access it, swift guarantees a crash whereas objc doesn't?0 replies 0 retweets 0 likes -
-
@jckarter@chriseidhof sweet. Is it ever possible to make an `assign` reference in swift? Maybe through some Unsafe API?0 replies 0 retweets 0 likes
@heathborders @chriseidhof There's unowned(unsafe), which is completely unmanaged.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Joe Groff
Chris Eidhof
Heath Borders