Free memory on close

Hi!

How can I free memory when I close the browser??

Julie

Julie,

your Vaadin application instance method close() will be invoked when user session expires or ends, so you may free up any resources your application own. Also, window instance method close() also called when window is closed.

It cannot be guaranteed, however, that every time web browser or web window closes, your server side close method will be called as this is done by the JS event from a browser which may not be sent sometimes.

But your application close method will be called in any case when session expires. This may happen , however, not immediately but several or tens minutes later then actual application window closure (depends on session timeout and servlet container).

Dmitri