Garbage collection

Hello,

Have some thought about when a View is Garbage collected.

Imagine if I have a large List with many data object inside as member in a View class.
An instance is created by each session?

Is it possible to to run finalize when the View is navigated from or browser windows closed?

Imagine if I have a open JDBC connection that needs to be closed prograamtically.

I tried the below but it’s not always caLLed
public void beforeLeave(ViewBeforeLeaveEvent event)

Thanks,