| || |
Java application - trash collection
Does anyone know of a way to force trash collection (memory recovery) in a Java application? Short of terminating and restarting the application, that is.
Re: Java application - trash collection
We had a BAD memory leak problem using JDK 1.2.2. After a few solid pushes from we automation folks (with our Silk scripts with timers and such to back us up!) Development found time to dig into it. Turns out the there has been a known memory leak problem in JDK for something like 2 years. Our results on JDK 1.1.7 were a little better but JDK 1.3 appears to have really corrected the problem.
We have manually tested the memory leak issue under JDK 1.3 and it does seem to have gone away. But we have to upgrade to Silk 5.0.3 to get JDK 1.3 support which we're planning to do at the beginning of July.
During the investigation my developers were adamant that they had no conrol over garbage collection in Java. Then they did finally find a situation where an object was being created then only hidden instead of being destroyed. Then the next time the dialogbox was invoked another instance of the object was being created. After opening this dialogbox 10 or so times everythign froze. They fixed that but the app behaved exactly the same way. Turns out that this was in fact our big example of our memory leak and this was some other bug in JDK where the destroy method was empty. Or something like that.
Almost all of the details that my developers provided to me came from the sun web site or other developer-type resource that java developers would know about. By the latter I mean that it didn't take them very long at all to get the info they needed.