That's exactly the behaviour I am seeing, at a certain point the garbage
collector kicks in but by that time there is already a significant amount of
memory that is never reclaimed.
However after reading some of the related posts I have downloaded JProbe and
am currently investigating the possibility of a self induced memory leak.
If I can't fix it I'll post some code.

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED] Behalf Of Florin Herinean
Sent: 28 February 2003 10:49
To: [EMAIL PROTECTED]
Subject: [JAVA3D] AW: [JAVA3D] Detaching a BranchGroup not releasing
memory


I have seen this behavior in my app too, and clearly is not related to any
of the suggested bugs. However, it looks mostly as being related to the
garbage collector who doesn't get the chance to start collecting. Let me
explain the strange behavior that I'm seeing:

First time I load my standard test model, mem usage increses 20 mb. Then hit
reload button, there is another 10 mb increase. Keep hitting the reload
button, and the memory  usage keeps increasing, but each time with a lower
value, stabilizing at the approx. value of 100 mb. It seems, that at that
point I'm reaching an equilibrium and the mem is not increasing anymore. For
me it's looking like only now the garbage collector starts working.
Interesting enough, the same behavior I've seen using the j3dfly demo 2.0:
repeatedly loading the city, you will see a memory increase, stabilizing on
my machine at 137 mb.

The problem is that the bigger the model, the higher the stabilizing roof.
With models needing over 100 mb, it seems that you reach the
out-of-memory-error before the stabilizing roof.

Using jdk 1.4.1, j3d 1.3fcs, p3 800, 768 mb ram, geforce2 mx.

No need for special case to investigate, just use j3dfly demo *with a big
enough model* !

Cheers,

Florin

-----Urspr�ngliche Nachricht-----
Von: Mark Hood [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 28. Februar 2003 01:22
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] Detaching a BranchGroup not releasing memory


> Date:         Thu, 27 Feb 2003 20:02:15 -0000
> From: Brendan Cleary <[EMAIL PROTECTED]>
>

> I have an app that interactively builds models of given hierarchical data
> sources, it works and the models typically take about 20 - 50 MB depending
on
> depth and branching factor etc.  The models are rooted at a BranchGroup
that
> I detach when I want to rebuild the model for a new data source and then
> reattach.
>
> The problem is that each time I reattach the BranchGroup the memory used
by
> the new model is added to the memory already in use, the memory used by
the
> old now not referenced model is not collected at any time.

What version of Java 3D are you using?

Are you using SharedGroup in Java 3D 1.3 FCS or 1.3.1 beta?  If so,
bug 4794994 - "Memory leak when SharedGroup removed"
may apply.   This bug is fixed in the upcoming Java 3D 1.3.1 release.

Are you using a beta release of Java 3D 1.3?  If so,
Bug 4688070 - "Memory not immediately reclaim when branchgroup remove"
may apply.  This bug was fixed in Java 3D 1.3 FCS.

If you're using 1.3 or the beta release of 1.3.1 and neither of the above
apply, please send us a test case for investigation.  If you're using an
earlier version than 1.3, consider upgrading -- a number of memory leaks
relating to branchgroups have been fixed since 1.2.

Thanks -- Mark Hood

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

=========================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to