Hi,
So I have this simple application that uses a JPanel as a canvas.
I use arrays of Point2D.Double and Line2D.Double objects to to keep track
of where to draw lines/points. This canvas can have around 1000 point
objects and about 300-400 line objects associated with it. After I use
this canvas to display, I simply throw it away for a new one like:
myCanvas c;
...
c= new myCanvas();
Now in linux using the jdk1.2-pre_v2, the programs memory requirement
grows without bound until it crashes my system. Sun's jdk doesn't do
this. It settles in with about 10 megs in memory and 30 megs in swap and
wil stay there all day. This is what I expected in the first place, that
the program would grow for awhile until the allocation to Garbage
Collection ratio settled out.
Is this a know problem in the Linux JDK?
I have another question that is related to this problem, but not to
linux-java specifically:
How can I tell how much memory an object takes? I'm interested to know how
big a Dimension object or a Point2D.Double object is, compared to say, a
primitive double. I realize the Point2D.Double object will be larger, but
by how much? Would it make more sense just to keep my coordinates in
double arrays make a shape and draw it, rather than keeping the whole
shape in an array to draw it?
Any insights would be appreciated.
--
Daniel P. Zepeda
[EMAIL PROTECTED]
"May the Schwartz be with you." -- Yogurt in Spaceballs. (MMM, yummy!)
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]