This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it necessary to remove any Request attributes?

 
Timothy Sam
Ranch Hand
Posts: 751
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would it make noticeable slowdown in my application if I don't remove it? Would it add extra overhead to my app? Or is it destroyed sometime in my application? Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64190
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally, don't worry about it. The request will go out of scope when the response is sent back to the client. At that time, any scoped variables (attributes) will be subject to garbage collection rules.

Because session and application scopes stay around longer, you need to be mindful of variable life-time in those scopes, but for page and request scopes, it's not usually an issue.
 
dema rogatkin
Ranch Hand
Posts: 294
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some servlet containers maintain an object pool of request objects, so the content won't be collected. However in this case servlet container has to assure that request looks like freshly created.
 
Timothy Sam
Ranch Hand
Posts: 751
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your inputs guys
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic