Hi,
My application is built with Vaadin 7.1.14 and Spring 3.2.4. The scope of the UI is prototype.
I would like to know the best practice to manage browser refresh (F5 key). I have noticed that when the user press F5,
a new UI is constructed and its init method is called. The old UI is not destroyed, but you can find it iterating over the collection VaadinSession.getCurrent().getUIs(), so I’m afraid this can cause some memory leaks. Do you have any suggestions?
Thank you, Francesco
It is normal for the closed UIs to be kept for a while, especially if the browser didn’t manage to notify the server that it was closed. Even if there was such a notification, they might hang around a moment in the “closing” state if I remember correctly. However, in both cases, they should be cleaned up when a request is made to the application after a few missed heartbeat messages.
The UIs should also get cleaned up when the session ends.