Hi,
Not perhaps the best attitude to the problem but I found that I was running
out of memory a lot so i just use java with the -Xmx flag to increase the
maximum heap size e.g. java -Xmx1000M.
Generally the stuff I'm not using gets paged out to disk where it hangs
around until the garbage collector actually gets around to freeing it up.
Probably bad practice but at least it saves the annoyance of continually
running out of memory because of objects that aren't used any more.
Ewan
----- Original Message -----
From: "Frank Oellien" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 12:48 PM
Subject: Re: [JAVA3D] Poor performance, Memory leak, any trick? ;)
> Hello ,
>
> I have a similar problem with my 3D application.
> I have an update method. During the update the scene will completly
> raranged. So I decided to add new branchgroups with the current content
> to the scene. I use a similar approach as described by Jon Barrilleaux
> in his 3DUI book.
> I can set my world to non live and than I overwrite my old variable with
> a new instance (see _glyphs = new GlyphWorld()). However, it seems that
> the old data will not disappear. With each update I will loose 6 - 12 MB
> memory and after some operations I got a OutOfMemory error.
> Deleting the locale or pushing the garbage collector has no influence.
> Any ideas?
>
> _world.setLive(false);
>
> int numChildren = objWorld.numChildren();
>
> // remove all existing childs from the scene
>
> for (int i = 0; i < numChildren; i++) {
>
> objWorld.removeChild(0);
>
> }
>
> _glyphs = new GlyphWorld();
>
> objWorld.addChild(_glyphs);
>
> _world.setLive(true);
>
>
> With reagards
>
> Frank Oellien
>
> Mehrtash Babadi wrote:
>
> > Dear members,
> >
> > Hi :)
> >
> > There's a while I've been developing a
> > non-commercial molecule modelling software
> > for java and I've used java3d API for the
> > rendering jobs by now. There is a nasty hole
> > in j3d and it is too annoying these days.
> > On each iteration, I detach and attach a temporary
> > BranchGroup to a parent group but it seems
> > that the old branchgroup doesn't get disposed
> > in anyways and the memory fills up in seconds.
> > So, I tried to devide that temporary branchgroup
> > into little branchgroups and update those sub
> > groups but when I create a live instance of the
> > temporary branchgroup, the subgroups only can add
> > and remove branchgroups, no transformgroup and ...
> > is accepted (I get sth like
> > AccessRestrictionException) I've played with the
> > capability bits enough and but it hasn't helped.
> > So, I tried to update the Shape3D's of the sub
> > groups... It worked but with a really poor
> > performace and screen shuffle ups!
> > Can I switch back to the old methods I mentioned
> > with a trick? or can I improve the performance
> > of Shape3D updates on display? (I tried to
> > stop the renderer on the update sequence but it
> > didn't work!)
> >
> > Any reply is too much appreciated!
> >
> > Sorry for the long mail,
> > Sincerely,
> > Mehrtash
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Yahoo! Sports - live college hoops coverage
> >http://sports.yahoo.com/
> >
>
>===========================================================================
> >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".
> >
> >
>
> --
> Computer-Chemie-Centrum and Institute of Organic Chemistry
> University of Erlangen-Nuremberg
> Naegelsbachstrasse 25, D-91052 Erlangen (Germany)
> Tel (+49)-(0)9131-85-26579 Fax (+49)-(0)9131-85-26566
> email: [EMAIL PROTECTED]
> WWW : http://www2.chemie.uni-erlangen.de/oellien/
> http://www2.chemie.uni-erlangen.de/ChemVis/
>
>
===========================================================================
> 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".