Re: Release mode bindings crash and release pools
Re: Release mode bindings crash and release pools
- Subject: Re: Release mode bindings crash and release pools
- From: Jonathan Mitchell <email@hidden>
- Date: Sat, 17 Jun 2017 21:11:45 +0100
> On 17 Jun 2017, at 16:36, Charles Srstka <email@hidden> wrote:
>
>> On Jun 17, 2017, at 8:36 AM, Jonathan Mitchell <email@hidden
>> <mailto:email@hidden>> wrote:
>
>
> Just tested it on 10.9; it works :-)
>
> import Foundation
>
> class C: NSObject {
> @objc dynamic var foo = "Foo"
> }
>
> let c = C()
>
> let observer = c.observe(\.foo) { obj, _ in
> print("Foo changed: now it's \(obj.foo)")
> }
>
> c.foo = "Bar"
>
> Running it on my Mavs VirtualBox VM, this outputs:
>
> $ ./kvotest
> Foo changed: now it's Bar
>
> Charles
Thanks for taking the time to test that.
I haven’t had time this week to take look at the new 10.13 APIs.
Will the above translate to Obj-C?
J
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden