Board index » jbuilder » Memory leaks with dbswing

Memory leaks with dbswing


2007-03-20 12:01:49 AM
jbuilder14
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
hours.
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,
etc.
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
com.borland.dx.dataset.Column.
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
current status?
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.
John
 
 

Re:Memory leaks with dbswing

John T. Dow wrote:
Quote
I am
wondering if any of those problems have been fixed - ie what is the
current status?
Unfortunately, DataExpress and dbSwing have not been updated for a very
long time and there doesn't appear to be much hope that they they ever
will be. Your frustration is shared by many, including myself.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
www.datadevelopment.com/
Please see Borland's newsgroup guidelines at
info.borland.com/newsgroups/guide.html
 

Re:Memory leaks with dbswing

"Kevin Dean [TeamB]" < XXXX@XXXXX.COM >wrote in
Quote
John T. Dow wrote:

>I am
>wondering if any of those problems have been fixed - ie what is the
>current status?

Unfortunately, DataExpress and dbSwing have not been updated for a very
long time and there doesn't appear to be much hope that they they ever
will be. Your frustration is shared by many, including myself.

The memory leak was caused by creating objects (such as JDialog and all the
components on it) from within actionPerformed, such as a button click or a
menu choice. I fixed it by doing invokeLater to create the dialog.
John
 

{smallsort}