Two Laptop Bag
The moose likes Java in General and the fly likes Memory Leak Issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Memory Leak Issues" Watch "Memory Leak Issues" New topic

Memory Leak Issues

Viswas majrekar

Joined: Dec 20, 2008
Posts: 5
Hi Eveyone,

Can you please give me solution for this issue,

In my application i used Tomcat, JSF framework, Hibernate, MySQL.

We are getting memory leak issues in the application, because of this application also very slow.

So please any one guide me how can i solve this issue.

Waiting for reply.
Rob Spoor

Joined: Oct 27, 2005
Posts: 20276

Are you closing all of your resources (input streams, output streams, readers, writers, result sets, statements, connections) when you're finished with them?

How To Ask Questions How To Answer Questions
vikram Kesav
Ranch Hand

Joined: Jul 11, 2008
Posts: 69
Check also for any recursive call in your application if any.
Nullify object after its uses.
Tanzy Akhtar
Ranch Hand

Joined: Jul 19, 2009
Posts: 110
Hi Viswas,

You may also cache some data which are same in different calls.
Simply use hash map to cache data.


Roll with punchers, there is always tomorrow.
Techie Blog --
Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
For starters - run a profiler to accurately figure out where and what exactly is causing the memory leak[s]. There are many freely available memory profilers, written in Java. Pick one and then post the results back, so that you can be suggested some appropriate solution, instead of turning this post into a general discussion about memory leaks in Java!
I agree. Here's the link:
subject: Memory Leak Issues
It's not a secret anymore!