Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why does my actionclass accumulate memory?

 
Mattias Andersson
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.
 
Joe Ess
Bartender
Pie
Posts: 9264
10
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic