hi-
In the following two code samples, I use Hibernate and then pass the results as a ArrayList to a GUI app. The problem is as I have watched is that it doesn't release the Hibernate memory until the GUI is closed. I find it interesting that "hello world" in SWT without Hibernate is only 13,000 k of
java heap memory, and my current GUI app is not much more complicated, but I can't get the computer to release the memory, until I close my GUI app. If I make it Hibernate only with no GUI the memory spikes to about 48,000k, and when the program is done running, it takes 0 memory in the taskmanager in Windows 7. If I run the GUI SWT app, memory gets as high as 55,000 k for that little app which shouldn't be so high, if the memory is released from Hibernate.
Any ideas how I can fix it, or am I stuck with it? I worked kind of hard trying to come up with this code so far and to diagnose. Maybe I can reclaim the memory somehow in my code like setting the initial heap size again right from within my code. As I understand, garbage collection reclaims heap size. GC happens when I close the SWT app. Do you find similar issues? Please help me fix it. THANKS
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
>