Hello. I was wondering if someone could help me track down the cause of a memory leak that I have been trying to nail down for the passed week. I have found, I hope, the cause of the leak but I cannot seem to get rid of it. While switching levels I run through an array that contains all the Entities, recycle the Entities. Then I splice the array. The issue I have noticed is that even after splicing the array I can call a trace on the Entities and apparently they are still their, they seem to disappear when I add more items to the array but the memory used for the Entities stays used.
Here is the code I am using to recycle the entities:
for (var index:int = 0; index < worldItems.length; index += 1)
{
recycle(worldItems[index]);
}
worldItems.splice(0 , worldItems.length);
loadMap();
Any help would be greatly appreciated!