Reputation: 32114
I dynamically add and remove elements form VGroups. When I create an element and then append it to a VGroup and then remove it from that VGroup, does it destroy the element completely? if not, how can I destroy the element so it won't take space in memory.
Upvotes: 2
Views: 1603
Reputation: 32114
An Object is sent to the garbage collector as long as there are no references to this object. which means two things:
all container elements that include this object should remove the element (Group,Box,Container,...)
all event listeners should be removed.
Upvotes: 2