I can't make the event listener for object 3d weakly referenced
because the MouseEvent3D listener expects just one argument.
Anyway, I remove this listener of each object before remove them from
the container.
And there's a way to wait the garbage collector?
Thanks man!

On 12 abr, 17:23, Choons <chadkim...@gmail.com> wrote:
> with Flash you have to wait until the memory garbage collector cleans
> up everything which isn't instant when you remove objects. Also, make
> sure your event listeners are weakly referenced so when you remove an
> object Flash doesn't see any other references to it. Here's a good
> explanation of it
>
> http://gskinner.com/blog/archives/2006/07/as3_weakly_refe.html
>
> On Apr 12, 1:54 pm, Nathan Queija <nathanq...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Guys,
>
> > I did:
>
> > mesh.geometry = null;
>
> > Right?
>
> > But the memory is still increasing.
> > Before I remove children, the memory consumed is 49M. ok!
> > When I remove the children, and do all this steps, the memory goes to
> > 44M, and when I add the other children I want the memory goes to 55M,
> > I think the children that I removed are still allocated.
>
> > Con you help me, please?
>
> > On 11 abr, 18:54, Nathan Queija <nathanq...@gmail.com> wrote:
>
> > > I import all this classes into my project and create an instance of
> > > each class.
>
> > > After, I remove all these children, because I want to add another.
> > > I removed the events too before removeChild() and nullify the instance
> > > too.
>
> > > But how can I nullify the geometry? I am not doing this.
>
> > > On 11 abr, 18:50, Fabrice3D <fabric...@gmail.com> wrote:
>
> > > > do you declare or save the as files?
> > > > since you do removeChild, you keep a list of them somewhere, do you 
> > > > clear it as well?
> > > > if you want destroy the mesh, make sure you remove the events if they 
> > > > have some, then nullify their geometry, then nullify them.
>
> > > > Fabrice
>
> > > > On Apr 11, 2011, at 11:32 PM, Nathan Queija wrote:
>
> > > > > I tried, but doesn't work because the class exportes doesn't has this
> > > > > method.
>
> > > > > I get this error:
> > > > > 1061: Call to a possibly undefined method dispose through a reference
> > > > > with static type lojas:ModelAB.
>
> > > > > Thanks for help!
>
> > > > > On 11 abr, 18:28, Josh Beckwith <josh.beckw...@gmail.com> wrote:
> > > > >> Try target.dispose();
>
> > > > >> On Apr 11, 1:15 pm, Nathan Queija <nathanq...@gmail.com> wrote:
>
> > > > >>> Hi guys!
> > > > >>> I have an object container, that all its children are at least 50
> > > > >>> models, exported from Prefab as an .as file.
> > > > >>> That's nice! It works prefectly!
> > > > >>> The problem is: I want to remove all these children and add some
> > > > >>> others, but when I do this the memory increase each time more and it
> > > > >>> seems that never remove the reference to the other models loaded.
> > > > >>> How can I fix this?
> > > > >>> I ever tried, removechild(), set instance to null, I thought that 
> > > > >>> was
> > > > >>> the material of these objects, but I tried to not apply any material
> > > > >>> and this thing still continue happens.
> > > > >>> Please, help me! =)
> > > > >>> Sorry for the bad english!
> > > > >>> Thanks so much!

Reply via email to