jQuery in Action, 3rd edition
The moose likes JSP and the fly likes help,about HashMap! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "help,about HashMap!" Watch "help,about HashMap!" New topic

help,about HashMap!

jony zhang

Joined: May 23, 2004
Posts: 1

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.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

I'm going to move this to the JSP Forum, where folks are expert in the details of this sort of thing.

[Jess in Action][AskingGoodQuestions]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

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).

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: help,about HashMap!
It's not a secret anymore!