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

Disposing of observers and resources in Xamarin.Forms #45

Open
Wenfengcheng opened this issue Jun 14, 2019 · 0 comments
Open

Disposing of observers and resources in Xamarin.Forms #45

Wenfengcheng opened this issue Jun 14, 2019 · 0 comments

Comments

@Wenfengcheng
Copy link
Owner

OnElementChanged is called twice - when control is created and then when disposed.

if(e.NewElement != null)
      addobserver and do other stuff
if(e.oldElement!=null)
       remove observer and destroy everything you allocated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant