<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 8, 2016, at 11:56 AM, Félix Cloutier via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Has there been a garbage collection thread so far? I understand that reference counting vs. garbage collection can be a heated debate, but it might be relevant to have it.</div><div class=""><br class=""></div><div class="">It seems to me that the two principal upsides of reference counting are that destruction is (essentially) deterministic and performance is more easily predicted. However, it comes with many downsides:</div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">object references are expensive to update</li><li class="">object references cannot be atomically updated</li><li class="">heap fragmentation</li><li class="">the closure capture syntax uses up an unreasonable amount of mindshare just because of [weak self]</li></ul></div><div class=""><div class=""><br class="webkit-block-placeholder"></div><div class="">Since Swift doesn't expose memory management operations outside of `autoreleasepool`, it seems to me that you could just drop in a garbage collector instead of reference counting and it would work (for most purposes).</div><div class=""><br class=""></div><div class="">Has a GC been considered at all?</div></div></div></div></blockquote><br class=""></div><div>We very deliberately chose an ARC model for Swift. It is *way* out of scope for Swift 3; I don’t think it’s worth discussing this on swift-evolution at all.</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br class=""></div><br class=""></body></html>