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 <[email protected]> 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 <[email protected]> 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 <[email protected]> wrote: > > >> Try target.dispose(); > > > >> On Apr 11, 1:15 pm, Nathan Queija <[email protected]> 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!
