Open netbeansuser2019 opened 4 years ago
So without that e.g. any opening pages from internet-browser-bookmarks cannot signal leaving of page can lead to xy not needed instances in memory that could be even heavy.
Thank you @netbeansuser2019 for the ticket. I move this to the Flow team for investigations.
See also #8400
Ref vaadin/platform#1351
Regardless to if it is implemented com.vaadin.flow.router.BeforeLeaveObserver it should be released "route component" and even layout with respecting to com.vaadin.flow.router.PreserveOnRefresh.
So shorting period to be marked as inactive so javascript event unload -> shorting activity period on server for that instance -> nothing comes then release earlier like detach and release to be possible cleared by garbage collector.
and if implements com.vaadin.flow.router.BeforeLeaveObserver call beforeLeave(...) where (event.isUnloadBrowserEvent() && !event.isFromClient()) this is true.