FilledStacks / boxtout

An open source food delivery product and service that will be developed on the FilledStacks YouTube channel
MIT License
416 stars 167 forks source link

disposeForm not called #19

Open manafire opened 3 years ago

manafire commented 3 years ago

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 commented 3 years ago

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

FilledStacks commented 3 years ago

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