<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="">This is getting interesting.<div class=""><br class=""></div><div class=""><div class="">I added your suggested test code (set to execute once):</div><div class=""><font face="Courier New" class="">class FontSelectorDialog : UITableViewController {</font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>static let chooser : ColorChooser = ColorChooser()</font></div><div class=""><span class="Apple-tab-span" style="white-space:pre"><font face="Courier New" class="">        </font></span></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>override func viewDidAppear(_ animated: Bool) {</font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>super.viewDidAppear(animated)</font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>FontSelectorDialog.chooser.textChooserType = .text</font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>&lt; . . . &gt;</font></div><div class=""><font face="Courier New" class="">}</font></div><div class=""><br class=""></div><div class="">BY THE WAY — I didn’t think to mention this previously, but the “leaking” code is in a framework and I put the suggested test code in the same framework.</div><div class=""><br class=""></div><div class="">Using Xcode 8.3:</div><div class=""><br class=""></div><div class="">(1) Running Simulator for iPhone 7+ (10.3), profiling the code, neither your suggested test code NOR the original code shows a leak in the Leaks Instrument.</div><div class=""><br class=""></div><div class="">(2) Running on an iPad Air 2 (10.2), profiling the code, your suggested test code does NOT show a leak, but the original code DOES. (The stack trace for the leak point is at the bottom of this email.)</div><div class=""><br class=""></div><div class="">I haven’t taken the next step of attempting to build a simple example to see if I can duplicate the problem in a simple project. I’d like to pursue this because it is increasingly looking like a “not my” bug, and I’d like to prevent others from spending as much time on this issue as I have already.</div><div class=""><br class=""><div class="">
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="orphans: 2; text-indent: 0px; widows: 2;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="orphans: 2; text-indent: 0px; widows: 2;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="orphans: 2; text-indent: 0px; widows: 2;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div style="color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;" class="">Cheers,</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;" class="">Rick Aurbach</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;" class=""><br class=""></div></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></div></div></div></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Mar 28, 2017, at 4:14 AM, Alex Blewitt &lt;<a href="mailto:alblue@apple.com" class="">alblue@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><blockquote type="cite" class="">On 28 Mar 2017, at 05:41, Rick Aurbach &lt;<a href="mailto:rlaurb@icloud.com" class="">rlaurb@icloud.com</a>&gt; wrote:<br class=""><br class="">That wouldn’t work directly. The “leak” occurs when processing a segue called in response to a user button push. (I suppose I could attempt to wire up a UI Test, but would rather not go down that route.)<br class=""><br class="">What I can try is to see if I can create a simple, artificial example. If it also reports a leak, then I could try looping it. I’ll look into it in the morning.<br class=""></blockquote><br class="">You could try doing something like:<br class=""><br class="">static let choser:ColorChoser = ColorChoser()<br class="">choser.textChoserType = .text<br class=""><br class="">Run that in Xcode and see if it shows a leak.<br class=""><br class="">Alex</div></div></blockquote></div><br class=""><div class=""><br class=""></div><div class=""><div class="">&nbsp; &nbsp;0 libsystem_malloc.dylib malloc_zone_malloc</div><div class="">&nbsp; &nbsp;1 libsystem_malloc.dylib malloc</div><div class="">&nbsp; &nbsp;2 libswiftCore.dylib swift_slowAlloc</div><div class="">&nbsp; &nbsp;3 libswiftCore.dylib _swift_allocObject_</div><div class="">&nbsp; &nbsp;4 libswiftCore.dylib _swift_allocObject_</div><div class="">&nbsp; &nbsp;5 RLAFontSelector specialized RLAFontSelectorDialog.prepare(for : UIStoryboardSegue, sender : Any?) -&gt; () /Users/rlaurb/Projects/RLAFontSelector/Sources/RLAFontSelectorDialog.swift:0</div><div class="">&nbsp; &nbsp;6 RLAFontSelector RLAFontSelectorDialog.prepare(for : UIStoryboardSegue, sender : Any?) -&gt; () /Users/rlaurb/Projects/RLAFontSelector/Sources/RLAFontSelectorDialog.swift:0</div><div class="">&nbsp; &nbsp;7 RLAFontSelector @objc RLAFontSelectorDialog.prepare(for : UIStoryboardSegue, sender : Any?) -&gt; () /Users/rlaurb/Projects/RLAFontSelector/Sources/RLAFontSelectorDialog.swift:0</div><div class="">&nbsp; &nbsp;8 UIKit -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:]</div><div class="">&nbsp; &nbsp;9 UIKit -[UIStoryboardSegueTemplate _perform:]</div><div class="">&nbsp; 10 UIKit -[UIStoryboardSegueTemplate perform:]</div><div class="">&nbsp; 11 UIKit -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:]</div><div class="">&nbsp; 12 UIKit -[UITableView _userSelectRowAtPendingSelectionIndexPath:]</div><div class="">&nbsp; 13 UIKit _runAfterCACommitDeferredBlocks</div><div class="">&nbsp; 14 UIKit _cleanUpAfterCAFlushAndRunDeferredBlocks</div><div class="">&nbsp; 15 UIKit _afterCACommitHandler</div><div class="">&nbsp; 16 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__</div><div class="">&nbsp; 17 CoreFoundation __CFRunLoopDoObservers</div><div class="">&nbsp; 18 CoreFoundation __CFRunLoopRun</div><div class="">&nbsp; 19 CoreFoundation CFRunLoopRunSpecific</div><div class="">&nbsp; 20 GraphicsServices GSEventRunModal</div><div class="">&nbsp; 21 UIKit -[UIApplication _run]</div><div class="">&nbsp; 22 UIKit UIApplicationMain</div><div class="">&nbsp; 23 PoetsCorner main /Users/rlaurb/Projects/PoetsCorner/PoetsCorner/SettingsController.swift:13</div><div class="">&nbsp; 24 libdyld.dylib start</div></div><div class=""><br class=""></div></div></div></body></html>