• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Why does my actionclass accumulate memory?  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an actionclass which is called by ajax on the web page.
I create only an object of Testclass.
Looking in a memory profiler I can see that for each ajax request there is a new Testclass on the heap.
Even if thisClass in nulled it is still there on the heap.
And next time this action executes there are 2 Testclass on the heap etc...





Is there anyone who can tell me whats wrong?
I have been struggling with this problem a few days now and are starting to get desperate.
 
Bartender
Posts: 9559
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Garbage collection is not instantaneous. If you have a large heap, you may accumulate many instances before they are swept up.
Your profiler may have a way to trigger garbage collection. Try that and see what happens.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!