Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help,about HashMap!

 
jony zhang
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,all:

i use a lot of (may be 100) HashMap objects to save some data,and add
these HashMap objects to ArrayList object,and then save ArrayList object to
pageContext (in page scope) in a jsp page.
now i have problem : when many people (may be 100 - 1000) visit my jsp
page,these HashMap objects will not release memory,or release memory very
slowly.and then my webserver (resin 3.0.4) will out of memory.
so i want to know is there have some way to release these HashMap
objects when jsp page end?
please help me!i am waiting.
thanks!
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to move this to the JSP Forum, where folks are expert in the details of this sort of thing.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If there are no other references to the objects, they will become subject to garbage collection when the page context goes out of scope (which occurs after the page is sent to the browser).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic