boxtout icon indicating copy to clipboard operation
boxtout copied to clipboard

disposeForm not called

Open manafire opened this issue 3 years ago • 2 comments

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 avatar Apr 18 '21 23:04 manafire

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

manafire avatar Apr 19 '21 13:04 manafire

@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.

FilledStacks avatar Apr 20 '21 08:04 FilledStacks