One thing about object reuse--I have seen some odd performance artifacts, at
least in 3.4, which is the version I'm on.

For example, my app creates tons of segments in a mesh to create complex
wireframes.  Each segment uses one of a very small number of materials, 4
possibilities.  I observed radically slower performance when I just created
the 4 materials and shared them versus creating new materials for each
segment.  This was much more pronounced in debug than production.

My conclusion is you have to test this stuff both ways to understand what
performance will do.

Cheers,

BW

On Sun, Jan 9, 2011 at 2:56 PM, Brian Bosak <[email protected]>wrote:

> ?One thing you could do is set objects that you are no longer using to
> null. That will save a lot of memory as well, but it is generally more
> efficient (in terms of RAM and CPU) to re-use existing objects as much as
> possible.
>
> -----Original Message----- From: macgor
> Sent: Sunday, January 09, 2011 4:52 PM
> To: Away3D.dev
> Subject: [away3d] Re: Garbage Collector - bad news
>
>
> so I started to rewrite my code to reuse instances of Away objects.
> Current saved 99% of memory that previously leaked.. :) But this is
> not how I'd like it to work...
>

Reply via email to