Well, the answer for your case it's quite simple. Create all the balls, behaviors and the other scene elements right from the beginning, then you don't create any scene element, only modify paths and visibility. I would make on top of all the balls a switch, so I would turn the balls on or off when resetting the scene. For your app, it's quite easy to NOT create extra objects. Don't rely on the garbage collector. For some obscure reason, it doesn't work with java3d.
Cheers, Florin -----Urspr�ngliche Nachricht----- Von: greg baboolal [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 21. Januar 2003 13:49 An: [EMAIL PROTECTED] Betreff: Re: [JAVA3D] A little help with code / system resource efficiency Hi all, thanks for the input so far (Ben: I am having a look a junit now.) My reasoning behind this line of thought started from a rogue claculation occurance that happens when the balls are at a sharp angles to each other. I have still yet to discover what is happening in these somewhat rare cases as the general calculation is ok, in the instance of this rogue event, the pretermined calculated path seems to take an unsually long amount of time, which inccurs a quick build up of memory consumption. For example if on loading or resetting the table, a cue force of 800 is stipulated and the ball's angle is set to be 359 the simulation takes a while before finally computing all paths. The simulation is governed by a thread and then these path arrays are given to each respective ball interpolator. However should I even try to put a triangle pack of balls on the table this computation runs indefinately, I understand that the calculation algorithm used at present is not suitable for such a situation. But prior to establishing the triangle pack scenario, I would like to get the app to be using it's resources effectively even in it's primitive state. At present my only way of knowing what is happening is from the system monitor thingy. Florin hit the nail on the head: If you see that when loading the scene your memory usage increses with 10 mb, then reset the scene and start all over and the memory increases another 10 mb, and each time you repeat the steps above the memory increses 10 mb, and after a while you see that the vm is using 250 mb, that surely reflects something, don't you think so ? __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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". ==========================================================================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".
