Hi Ingo,


   Using SimpleUniverse.getLocale().replaceBranchGraph()
may have memory leak due to bug 4387385 which should be fixed
by beta2. removeAllLocales() should be used right now to
workaround this if possible. You should all add
removeAllLocales() to all applet destroy method

  public void destroy() {
        universe.removeAllLocales();
    }

to properly clean up memory under Netscape/IE.


   To detach the View from the scene graph (instead
of the whole branchgroup) you should also set
ViewingPlatform to null and remove all Canvas3D attach
to the View as follows:

    simpleuniverse.getViewer().setViewingPlatform(null);
    simpleuniverse.getViewer().getView().removeCanvas3D(c3d);

Note that
    simpleuniverse.getViewer().setViewingPlatform(null);

is used instead of

    simpleuniverse.getViewer().getView().attachViewPlatform(null)

If SimpleUniverse utility is used.
It is because the ViewingPlatform utility will still hold a reference
to Viewer which in turn hold reference to View.

The memory leak in v1.2.1beta1 right now is not culmulative. It
should gone after the scene graph replace a few times. So it is
not as serious as in v1.2 FCS. Locale should be able to
reuse.

Thanks.

- Kelvin
-------------
Java 3D Team
Sun Microsystems Inc.




>X-Authentication-Warning: oc30.uni-paderborn.de: ib set sender to 
>[EMAIL PROTECTED]
using -f
>Date: Fri, 17 Nov 2000 16:02:19 +0100
>From: Ingo Brunberg <[EMAIL PROTECTED]>
>Subject: Re: [JAVA3D] Removing Object from Scene Graph
>To: [EMAIL PROTECTED]
>
>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