> Something I've noticed, with regard to Java3D, that's particularly
> vexing is that it doesn't seem to to garbage disposal very effectively,
> if at all. If I take one data set, and then start to visualize in
> different ways, more and more memory is steadily consumed, never to be
> made available again. Is this just a WinNT issue, or is it the case on
> other platforms as well? IS this something the new Java3D is supposed
> to fix?
> along these same lines, i have a little app i wrote that reads ASCII
> data files, builds a VisAD data structure with the data and writes out
> netCDF files (for use with the SpreadSheet). these netCDF files are
> signifigantly larger than the ASCII! 2.6 Mb of ASCII data becomes a 4.6
> Mb netCDF file. is this expected, or is it likely i'm doing something
Are you using Java's Output Object Serialization to do this? I ran into a
very similar problem with Java's ObjectOutputStream. If you are invoking:
for each one of your objects (which I was doing for all 128^3 (or 64^3) of
our cube objects) then something that looks like a memory leak will
appear. Each call to writeObject() will actually save a reference to that
object. This is for case you are writing something that looks like a
graph, the serialization object may then save the entire graph with
dependencies. If you're not writing a graph (no dependencies or pointers
necessary) than you can invoke:
and that will free up all those pointers taking up all that memory.
This is all documented in a bug report at www.javasoft.com but I
can't seem to bring up the URL again at this moment.
However, there's a catch, at least there was with my program on Linux. I
was finding that the size of the output file actually changed depending on
how many times I invoked the reset() method. The more often it was
called, the bigger my file size got, in some cases 3 times larger. So I
just call the reset() method as seldom as I can.
Robert S Laramee tel: (603) 868-1361
9 Woodman Ave, #316 office: (603) 862-0350
Durham, NH 03828 URL: http://www.cs.unh.edu/~rlaramee