Managed beans are just ordinary
J2EE javabeans which were created by
JSF on demand. You can delete them just like any other J2EE javabean.
However, web browsers don't send messages to the server when windows are closed. The closest you can get to that it to put an AJAX request into a JavaScript that gets triggered off a client window close event, and even that won't work if the user has turned off JavaScript.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.