This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Nearly every time I used the gc() method in the Runtime object, I was noticing, that it actually seemed to consume a few megabytes of my available memory. I used the method directly after heavy-duty image operations where I disposed all objects and nulled the database. I don't know why this happens, any ideas?
That's very hard to answer without knowing in detail what your program does.
It is almost always not necessary to call the gc() method. The garbage collector in the JVM is a sophisticated piece of software, and usually it knows better than you how and when to do garbage collection. You should never call gc() just because you have some vague feeling that it might be a good idea - trying to "help" the garbage collector might even be counter-productive, as you've discovered with your program.
Mh. Yes, I think that would be the solution, to just let it do it's job . I only thought, that it might be a good idea sind I heard a speech about it long ago, in which the garbage collection jsut seemed to cleanup in regular time-periods.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Garbage Collector decreases available memory