title: The managed beans were not be deallocated even after the sessions is invalid
body: <p>I've got a JSF application being served by Tomcat 6, and each session may gets viewScoped  beans allocated to it in the "session" scope as a managed bean . The problem is that the memory used to store this bean doesn't EVER seem to be getting deallocated, even after the sessions has spent hours in the idle state.</p>
  
  <p>Is there any way to force Tomcat to deallocate this memory after a session has been idle for a certain length of time (like say, 10 minutes)? If not, how about a way to manually deallocate this memory programmatically? Or is one of the features of a "managed bean" in the "session" scope that it will persists in memory until the server shuts-down, no matter what?
  Thanks in advance!</p>
  
  <p>But the viewScoped beans may not be deallocated. Because If clicked on a link on the expired page, The logs in tomcat console shows that the UIViewRoot on the serverside is still alive. The logs:
  <strong>beforePhase-RESTORE_VIEW 1
  afterPhase -RESTORE_VIEW 1 Time:3
  beforePhase-RENDER_RESPONSE 6</strong>
  And the memory of the server process didn't decline a little. If the server runs a relatively long time. The application's response is so slowly and seems not robust such as the paginator doesn't work and so on.
  Even When the server shutdown,the console printout :
  <strong>Waiting for 16 instance(s) to be deallocated</strong></p>
  
  <p>Are there anybody know about this?</p>