Re: [swift-users] Problem with Access Control and Extensions

2017-09-20 Thread Rick Aurbach via swift-users
erride open func viewDidLoad() { > super.viewDidLoad() > /* ... */ > } > } > ``` > > Am 20. September 2017 um 21:41:31, Rick Aurbach via swift-users > (swift-users@swift.org <mailto:swift-users@swift.org>) schrieb: > >> I am trying to write an extension to a

Re: [swift-users] Why does this leak?

2017-03-28 Thread Rick Aurbach via swift-users
This is getting interesting. I added your suggested test code (set to execute once): class FontSelectorDialog : UITableViewController { static let chooser : ColorChooser = ColorChooser() override func viewDidAppear(_ animated: Bool) {

Re: [swift-users] Why does this leak?

2017-03-27 Thread Rick Aurbach via swift-users
's actually a leak? > > - Dave Sweeris > > On Mar 27, 2017, at 13:31, Rick Aurbach via swift-users > <swift-users@swift.org <mailto:swift-users@swift.org>> wrote: > >> Okay, I downloaded the latest Xcode from the developer site. (The download >> page sai

Re: [swift-users] Why does this leak?

2017-03-27 Thread Rick Aurbach via swift-users
an artifact. Suggestions?? Cheers, Rick Aurbach > On Mar 27, 2017, at 3:01 AM, Alex Blewitt <alb...@apple.com> wrote: > > >> On 26 Mar 2017, at 18:43, Rick Aurbach via swift-users >> <swift-users@swift.org> wrote: >> >> I have a situation where I

[swift-users] Why does this leak?

2017-03-26 Thread Rick Aurbach via swift-users
I have a situation where I have a leak that I do not understand. I would be very grateful if someone could explain it to me and offer an idea of how I can make the pattern work without leaking: Consider two code snippets, the first of which leaks, while the second does not. Case 1: This

Re: [swift-users] Accessing the bundle of the call-site

2016-12-02 Thread Rick Aurbach via swift-users
Jordan, You are oh, so right! Thank you for helping me resolve a particularly major piece of stupidity on my part. The following code seems (subject to testing, of course), achieve what I’m looking for: public extension String { public func localized(dsoHandle :

Re: [swift-users] Accessing the bundle of the call-site

2016-12-02 Thread Rick Aurbach via swift-users
t; a magic pointer that's unique to the current dylib. Parsing out a module name > seems incredibly brittle; the form of #function is not guaranteed to be > stable or useful across Swift versions. > > Jordan > > >> On Dec 2, 2016, at 10:35, Rick Aurbach via swift-users >

Re: [swift-users] Accessing the bundle of the call-site

2016-12-02 Thread Rick Aurbach via swift-users
That’s clever! Thank you; I’d probably never have thought of that. Cheers, Rick Aurbach > On Dec 2, 2016, at 12:25 PM, Greg Parker <gpar...@apple.com> wrote: > >> >> On Dec 2, 2016, at 9:44 AM, Rick Aurbach via swift-users >> <swift-users@swift.org <