Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is Closures doesn't support custom-observed property in swift ? #60

Open
howoften opened this issue Dec 27, 2021 · 1 comment
Open

is Closures doesn't support custom-observed property in swift ? #60

howoften opened this issue Dec 27, 2021 · 1 comment

Comments

@howoften
Copy link

i define an observed property, and use observe(_, until: _, changeHandler: _) to get value changed callback,
most of time it works fine, but in iOS 10.3.3, i receive a crash log!
crash description: " *** was deallocated while key value observers were still registered with it";

i declare property like this
class Person {
@objc dynamic var age: Int = 18
}

@howoften
Copy link
Author

i notice that you invalidate KeyValueObservation in its changeHandler, is it too late?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant