Board index » jbuilder » Memory leaks with dbswing
John T. Dow
Memory leaks with dbswing
2007-03-20 12:01:49 AM
I'm using JBuilder2006 with Java 1.5.0_10 trying to clear up memory leaks
that prevent my application from running continuously for more than a few
The program can create many list boxes, all using the same library method
I wrote. This method reads a file with specifications for each list box
and then creates a JDialog with a JdbTable and a QueryDataSet with a
dynamically generated query and sort, making appropriate buttons visible,
The runtime configuration I am using at present these vm parameters so I
get a heap dump.
-Xms4m -Xmx128m -Xrunhprof:file=dump.hprof,format=b
I then use HAT to look at the heap.
After bringing up a list box several times, there are many cases of
"unintentional object retention", the worst cases being many hundreds
each of com.borland.dx.dataset.RowVariant and
When I google for this type of problem, I see discussions going back
several years. It seems that the programmer has had to explicitly undo
the JdbTable (listeners, adding it inside a scrollpane, etc). I am
wondering if any of those problems have been fixed - ie what is the
Is there some document that describes what dbSwing does now and how to
avoid memory leaks? How to read the HAT reports to know what to fix?
I've been working on this but I'm wasting precious time and not making
much progress. I don't know if I'm totally missing something about how to
close or dispose of things so there are no objects left behind.