When you use removeChild in view.scene, doesn't mean that object is free from any pointer pointing the object. System.gc() will only remove objects that are not pointed by any pointer.
In my games, when changing level or back to main menu, i have to remove all children in scene3D, and make sure that i don't have any variable pointing to that children. During the game, let's say the memory was 100 Mb, but when the player returns to main menu, the memory is reduced to 50 mb, only for objects that are needed for main menu. On Fri, Nov 5, 2010 at 9:02 AM, Galtrhan <[email protected]> wrote: > Thanks fo info. > > Wasn't familiar with that function :) > > Although putting it after scene.removeChild(... did'nt change anything > for me. > > What do you mean by "all objects"? Seems like I remove everything > unnecessary before calling gc()... > > On Nov 5, 8:58 am, Aji Pamungkas <[email protected]> wrote: > > Hello, Galtrhan > > > > I usually call : > > > > System.gc(); > > System.gc(); > > > > right after i set all objects to null. > > > > On Fri, Nov 5, 2010 at 1:09 AM, Galtrhan <[email protected]> wrote: > > > Pardon my forgetfulness... Forgot to ask the main question. > > > > > What is the correct way to reset away3d? > > > > > The way I did it is just my guess... > > > > -- > > Aji Pamungkas > -- Aji Pamungkas
