Skip to main content
Participating Frequently
August 8, 2011
Question

System.gc in release build.

  • August 8, 2011
  • 1 reply
  • 358 views

Hi at all,

is it possibile use System.gc() into a release build (mobile application).

My usage in ViewNavigatorApplication:

protected function init(event:FlexEvent):void
{
      NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, onActivate, false, 0, true);
      NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, onDeactivate, false, 0, true);
}

protected function onActivate(event:Event):void
{
    stage.frameRate = 24;
    event.stopPropagation();               
}
           
protected function onDeactivate(event:Event):void
{
        event.stopPropagation();
        stage.frameRate = 4;
       System.gc();
}

Thanks!

F.

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
August 8, 2011

I have used it when going from one scene to another, to clear out any no longer used graphics (hopefully). It did seem to help at the time, though that was with the origin CS5 packager.

Participating Frequently
August 8, 2011

Ok! Thanks Colin.