Doesn't the  VirtualUniverse.removeAllLocales() remove the view side of the
SU as well?  Then I've got to go about rebuilding it line by line?  Is there
a way just to remove all the content side of the scene graph with just one
line?  right now I'm using the following:


        Enumeration allBGs = dummyU.getLocale().getAllBranchGraphs();

        // first branchgroup is the view branch, leave it alone...
        BranchGroup BG = (BranchGroup)allBGs.nextElement();

        // if another branchgroup exists, it is the content group, so remove
it.
        if (allBGs.hasMoreElements()) {
            BG = (BranchGroup)allBGs.nextElement();
            dummyU.getLocale().removeBranchGraph(BG);
            BG=null;
        }


Daniel


> -----Original Message-----
> From: Ingo Brunberg [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 17, 2000 10:02 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] Removing Object from Scene Graph
>
>
> Hi Kelvin and the other guys at Sun,
>
> I did not want to attack you. I am quite happy that there is such a
> fantastic thing like Java 3D, just wanted to express my disappointment
> after testing the 1.2.1b1 concerning the memory problems.
> I must admit, that I'm currently not calling
> VirtualUniverse.removeAllLocales(), as I'm using the one line solution
> SimpleUniverse.getLocale().replaceBranchGraph(), but I will test this
> this weekend. I will report my observations on monday or tuesday. If
> it should work, it would really be great.
> It would be nice, if someone could send me the recommended sequence of
> function calls to use in order to avoid further misunderstandings.
> Especially I'd like to know, if I can reuse the existing Locale or
> have to create a new one.
>
> Regards,
>
> Ingo
>
> >Content-Type: TEXT/plain; charset=ISO-8859-1
> >Content-MD5: t1zuLJDuWse5kFSIQU3VRg==
> >X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by
> mail.java.sun.com id
> >                      eAGJkJl29610
> >Date:         Thu, 16 Nov 2000 10:53:56 -0800
> >Reply-To: Kelvin Chung <[EMAIL PROTECTED]>
> >Sender: Discussion list for Java 3D API
> <[EMAIL PROTECTED]>
> >From: Kelvin Chung <[EMAIL PROTECTED]>
> >Comments: To: [EMAIL PROTECTED]
> >
> >Hi Ingo,
> >
> >    Please send us your test application and we're happy
> >to take a look at this.  It should work in v1.2.1 beta1
> >if VirtualUniverse.removeAllLocales() is invoked before loading
> >a new scenegraph.
> >
> >Thanks.
> >
> >- Kelvin
> >---------------
> >Java 3D Team
> >Sun Microsystems Inc.
> >
> >>X-Authentication-Warning: oc30.uni-paderborn.de: ib set
> sender to [EMAIL PROTECTED]
> >using -f
> >>Date: Thu, 16 Nov 2000 17:59:21 +0100
> >>From: Ingo Brunberg <[EMAIL PROTECTED]>
> >>Subject: Re: [JAVA3D] Removing Object from Scene Graph
> >>To: [EMAIL PROTECTED]
> >>
> >>Hello,
> >>
> >>I just want to throw in a little comment. I have often complained
> >>about the memory leaks in Java 3D, because I have the same
> problems as
> >>Victor and everyone developing a j3d program, that contains a
> >>non-static scene. In my opinion this is the most urgent thing that
> >>needs to be fixed. For example, considering an mp3 player, would you
> >>like to exit it and restart it for every single song you want to
> >>listen to, simply because the second song would take your
> machine out
> >>of memory? -- But that is Java3D!
> >>I have also frequently heard, the memory leaks would be
> fixed (1.1.3,
> >>then 1.2 and last 1.2.1b1). But now that 1.2.1b1 is out, I don't see
> >>much improvement regarding memory leaks, although I must admit, that
> >>there are many bug fixes and improvements in other fields such as
> >>speed.
> >>
> >>O.K., let's see, what 1.2.1b2 will bring, but I almost would bet my
> >>car, that we will see a dozen of memory leaks remaining in there. So
> >>I'm looking forward to test 1.4 or 2.0 in two or three years.
> >>
> >>Best wishes,
> >>
> >>Ingo
> >>
> >>
> >>>Hi Victor,
> >>>
> >>>      The memory should be free when branchgroup removed if
> >>>there no other reference to BG in your application. (You may
> >>>want to set BG = null for safety). Several memory leak problem
> >>>is fixed v1.2.1 beta1 except one 4387385 which should be
> >>>fixed by beta2.
> >>>
> >>>Thanks.
> >>>
> >>>- Kelvin
> >>>-----------------
> >>>Java 3D Team
> >>>Sun Microsystems Inc.
> >>>
> >>>>X-Accept-Language: es,en
> >>>>MIME-Version: 1.0
> >>>>Content-Transfer-Encoding: 7bit
> >>>>Date: Wed, 15 Nov 2000 13:41:41 +0100
> >>>>From: V�ctor <[EMAIL PROTECTED]>
> >>>>Subject: [JAVA3D] Removing Object from Scene Graph
> >>>>To: [EMAIL PROTECTED]
> >>>>
> >>>>  Hello,
> >>>> I create a scene graph, everything is ok. The problem
> comes when I want
> >>>>to remove nodes from the scene graph. Supposing I have
> used a structure
> >>>>like the following one:
> >>>>
> >>>>   TG
> >>>>    |
> >>>>  BG  (1)
> >>>>    |
> >>>>  TG
> >>>>    |
> >>>> Link
> >>>>   |
> >>>>  ...
> >>>>
> >>>> If I want to remove the scene graph branch from (1), how
> do I set free
> >>>>the memory used. First, I remove it from the scene graph, and then
> >>>>what...?
> >>>>
> >>>>  Thanks in advance
> >>>>
> >>>>
> >>>>  PRISMAKER TEAM
>
> ==============================================================
> =============
> 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