Glad it was useful!
I would highly recommend not reloading the TensorFlow.js model  on every view change as the “load” is non trivial and will block your GUI (and even when we make it less intensive, its still going to use a lot of resource and potentially redownload the model every time when it does not need to depending on browser settings).
I would suggest loading TFJS model once, storing in a constant that does not get destroyed between view changes, and then just calling the prediction function when needed. This will lead to a much more performant web app and save bandwidth redownloading the model on every view change if you are not caching locally too eg in localstrorage etc.
Your suggested solution will solve the memory leak but will not solve performance issue as it will have to re parse everything every time and send to GPU memory from CPU which is very intensive.
Good luck!