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

disposeForm not called #19

Open
manafire opened this issue Apr 18, 2021 · 2 comments
Open

disposeForm not called #19

manafire opened this issue Apr 18, 2021 · 2 comments

Comments

@manafire
Copy link

In the video on integrating sign in, shouldn’t the disposeForm() method be called? I’m debugging breakpoints and not seeing that generated method called. Maybe it happens automatically? I just noticed it because the TextEditControllers seem to “randomly” drop off and not pick up new values (in my integration of it) after awhile, switching between screens. But that may have something to do with the emulator and hot reload, as restarting fixes it - for a little while.

In any case, wondering if missing the dispose would cause a leak?

      onModelReady: (model) => listenToFormUpdated(model),
      onDispose: () => disposeForm(),  // <--- MISSING??
@manafire
Copy link
Author

I'm also wondering if the disposeForm method needs to include calls to removeListener?

@FilledStacks
Copy link
Owner

@manafire yes. That is missing. It should be called there. I was probably going to add it in when I realised it's missing, if I ever did.

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

2 participants