Copy link to clipboard
Copied
I have some horrendous memory leaks to attack.
Is this the correct way to monitor your mem...?
private var checkMemoryIntervalID:uint = setInterval(performMemTest,1000);
function performMemTest():void {
trace(System.totalMemory);
System.gc();
System.gc();
}
I've traced the first leak to a function - if I don't make the function call, my mem stays the same no matter how many times I repeat whatever steps I take to get to that function.
So I thought I'd empty the function, and add the lines back in one by one to see where the leak is.
However, even with the function completely empty, mem still increases. Comment out the call to the function and mem stays where it should.
The function contructor is just...
private function populateData ():void
So I figure I am monitoring mem incorrectly, because the above line itself shouldn't be a mem leak, right?
Cheers for taking a look.
Copy link to clipboard
Copied
if you're calling that function with an event (either directly or indirectly), the problem may not be in that function but in some other listener function.
Copy link to clipboard
Copied
Gidday kglad
It's called from...
case "undone": | ||||||||
populateData(); | ||||||||
break; |
There's no leak if I comment out populateData(), but there is if not.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now