<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=""><blockquote type="cite" class="">On Mar 4, 2017, at 1:09 AM, David Hart via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></blockquote><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I encountered this precise memory leak in my code a few days ago, so I sympathize. A second solution would be to drop function references. I think a core team member suggested it on another thread.</span></div></blockquote></div><br class=""><div class="">If I had to guess, I’d surmise that it's probably the single most common memory leak in Swift and modern Objective-C code. What I wish is that it were possible to get rid of implicit captures altogether—instead of just inserting [weak self] when you *don’t* want to capture something strongly, also require [strong self] when you do. Referencing self otherwise causes an error. We’d never get away with it now, though, with the source compatibility promise in place.</div><div class=""><br class=""></div><div class="">Charles</div><div class=""><br class=""></div></body></html>