• Post Reply Bookmark Topic Watch Topic
  • New Topic

Garbage collection in Struts application  RSS feed

 
Bony Sen
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a struts based application, do we have to explicitly remove formbeans(scope:session) from the session when we move to another screen?
Isn't the garbage collector supposed to take care of that?
 
Sandeep Kumar Jakkas
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on the container implementation !!!
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[quote=Bony Sen
Isn't the garbage collector supposed to take care of that?

Yes, GC comes into action when session scoped beans/forms are expired, so no need to worry about unused, idle session beans and usually beans holds the properties, not a complex IO or DB operation..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!