After creating a three js object and adding some children to it, I changed the length of children to 0. As a result, the objects went out of screen. But will this action completely remove the objects from both the screen and memory?
var balls = new THREE.Object3D(); // parent
To create children:
var geometry = new THREE.SphereGeometry(5, 32, 32);
var material = new THREE.MeshPhongMaterial({color: 0x0f0ff0, shininess: 50, transparent: true, opacity: 1});
var sphere = new THREE.Mesh(geometry, material);
sphere.position.x = scale('some random value');
sphere.position.y = scale('some random value');
balls.add(sphere);
The above steps were repeated for more spheres.
Then in the console, I entered:
balls.children = [];
This action removed all the spheres from the scene. But does this also erase all the sphere objects from the memory?