Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Memory leak check question

Guest
Oct 04, 2013 Oct 04, 2013

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.

TOPICS
ActionScript
528
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2013 Oct 04, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 04, 2013 Oct 04, 2013
LATEST

Gidday kglad

It's called from...

case "undone":
populateData();
break;

There's no leak if I comment out populateData(), but there is if not.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines