How to make external SWFs garbage collected in Air for iOS?

My app uses lots of external SWFs( well they are actually included in the app with a folder but they aren't embeded ) and they do not contain any bitmapdata, only vector graphics. The problem I'm having is that they seem to be never garbage collected and System.privateMemory keeps increasing as the app loads more SWFs.
Since those SWFs only contain vector graphics, I simply nullify all the variables that are holding reference to SWF file and call System.gc().. But it doesn't seem to be working. What would I need to do for the garbage collector to clean the SWFs?
I'm using Air for iOS 3.5.0.1060 and ActionScript3.0.

Yes I'm calling System.gc() twice. I tried using loader.unloadAndStop(true) and it seems SWFs are being garbage collected but another problem has surfaced. When repeatedly loading and unloading SWF in a short period, the air garbage collector sometimes fails to work.
I've tested loading and unloading same SWF 50k times and checked trace.  Occasionally, garbage collector misses to collect garbage like below( swf #45119 is not being garbage collected).
[UnloadSWF] main.swf/[[DYNAMIC]]/45115
[UnloadSWF] main.swf/[[DYNAMIC]]/45116
[UnloadSWF] main.swf/[[DYNAMIC]]/45117
[UnloadSWF] main.swf/[[DYNAMIC]]/45118
[UnloadSWF] main.swf/[[DYNAMIC]]/45120
[UnloadSWF] main.swf/[[DYNAMIC]]/45121

Similar Messages

  • How to enable sampler in telemetry options at AIR for iOS Settings?

    Hi,
    I'm just trying the new Flash CC, and a very good feature is to monitor an iOS app using adobe scout.
    But when I export an app, in the AIR for iOS Settings, I always see "Enable sampler" option disabled. How can I enable the option?
    Thanks.

    Hi ,
    To enable the sampler option you need to set it in the Publish Settings dialog. Open the Publish Settings Dialog and select the "Enable detailed telemetry" option under the advanced section for the Flash(.swf) option.Now you will find the Telemetry option for enable sampler enabled in the AIR for iOS dialog.
    Thanks and Regards,
    Sudeshna Sarkar
    Adobe Flash Professional Team

  • How do you include extra files with an AIR for iOS Publish?

    I've seen people mention they can include .html, .js, etc files with their iOS for AIR publish when making an iOS application from flash.
    What I haven't seen is how these people include extra files (html, css, images, videos, etc) to be packaged into the IPA during publish.
    How is this accomplished?

    --deleted--
    Sorry, figured it out.

  • How to make External Reference number and Ref Date Mandatory in Complaints

    Dear Experts,
    Greetings!!!.
    How to make External Reference number (EXT_REF_NUMBER ) and Ref Date ( EXT_REF_DATE ) Mandatory in Complaints.
    Regards,
    Sany

    HI,
    You can use Incompleteness Procedure to make those fields mandatory in complaint transaction.
    Regards,
    PP

  • How to make intellisense enable in powershell in CSOM for sharepoint online?

    how to make intellisense enable in powershell in CSOM for sharepoint online?
    I am loading assembly  as following
    [Reflection.Assembly]::LoadFrom("$scriptdir\Microsoft.SharePoint.Client.dll")        
     [Reflection.Assembly]::LoadFrom("$scriptdir\Microsoft.SharePoint.Client.Runtime.dll")

    Hi,
    try this
    http://powerguivsx.codeplex.com/
    http://mackenzie-sharepoint.blogspot.com/2011/12/sharepoint-2010-powershell-intellisense.html
    https://technet.microsoft.com/en-us/library/ff461033.aspx
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/fcb85984-abf9-428a-a2a7-952cec37ea49/powershell-ise-intellisense
    Kind Regards,
    John Naguib
    Senior Consultant
    John Naguib Blog
    John Naguib Twitter
    Please remember to mark this as answered if it helped you

  • How to make an air for ios enterprise distribution Flash CS5.5?

    Hi, There seems to be only:
    Quick publishing for device testing
    Quick publishing for device debugging
    Deployment - Ad hoc
    Deploymnet - Apple App Store
    How does one do Deployment for in-house Enterprise Apps from Flash CS5.5 with AIR for iOS?
    Thanks!

    maweibezahn,
    The plist in step 2 is created so you can download the app onto the device.  This file stands alone, and does NOT need to be included in the app package, but it does need to reside in the same spot on the web server.  Below is an example plist file for an app.  You then access the following link from mobile safari to install:
    <a href="itms-services://?action=download-manifest&url=http://www.myserver.com/myAppPlist.plist">Tap Here to Install myApp On Your iPhone</a>
    ----------myAppPlist.plist------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>items</key>
              <array>
                                  <dict>
                                            <key>assets</key>
                                            <array>
                                                      <dict>
                                                                <key>kind</key>
                                                                <string>software-package</string>
                                                                <key>url</key>
                                                                <string>http://www.myserver.com/myApp.ipa</string>
                                                      </dict>
                                            </array>
                                            <key>metadata</key>
                                                      <dict>
                                                                <key>bundle-identifier</key>
                                                                <string>com.myServer.myApp</string>
                                                                <key>bundle-version</key>
                                                                <string>1.0.0</string>
                                                                <key>kind</key>
                                                                <string>software</string>
                                                                <key>title</key>
                                                                <string>My App Name</string>
                                                      </dict>
                                  </dict>
              </array>
    </dict>
    </plist>

  • How to reduce suttering in Air for iOS GPU mode?

    My game currently runs at 60FPS on iPad 2 and has no problem regarding rendering speed but I'm rather annoyed by constant stuttering which causes the game to stop for 0.1-0.5 sec  once in a while. The stuttering behavior is similar to when garbage collector is ran and I supposed it is casued by GPU memory swapping as my game uses lots of bitmapdata.
    Problem is that my game transits one scene to another scene seamlessly without stopping animations in the game screen by letting old game scene sliding out of the screen and new scene sliding in. So there's no time to preload/precache graphics assets used in the new scene. After transitting different scenes a few times, the game starts stuttering when trying to show new images.
    My game works fine without stuttering on old PCs but on iPad2 it is quite obvious. Could anyone tell me some tips to reduce stuttering when using Air for iOS? In the game, all vector graphics are pre-drawn to bitmapdata(so no vector graphics are shown) and the size of graphic assets each scene has is about 2048*1024 pixels. There are about 10 scenes. On top of that, there are common interface graphic assets which are used in all scenes and the size is about 30x 400*400 pixels.
    I know the game uses quite a lot of graphic resources. Making the game preload the assets before transitting to a new scene will eliminate stutter but I'd still like to see if I can keep the seamless scene transition on iOS.
    I'm currently using Air3.5 + Flash CS6.
    * I mean preloading/precaching by actually displaying( addChild and visible=true)  them on stage and make time for GPU to cache. All the actual graphic data are already loaded.

    Some things that might help:
    I've heard that textures are uploaded as square textures on iOS. I'm not certain that really happens, but if it does then having two 1024x1024 textures would be better than one 2048x1024, because that would end up actually taking 2048x2048.
    Bitmaps are sent to the GPU when they first hit the stage, and it takes a significant amount of time for them to get there. If you are timeline animating a transition to the next scene, stagger the graphics that are going to be appearing next. That is, before you start to move on to the next area have the biggest bitmap of the next are already touching the edge of the stage. It can be invisible, or underneath another graphic, it will still get uploaded. But if you tween in all of the graphics exactly when they are needed, they will take a while to upload.
    Dispose of the bitmaps that are no longer in the scene. I think your stuttering is because you're going into a new area that has a lot of new graphics, and the GPU still has the bitmaps from the current scene and the one before that, and so has to spend time freeing up the memory before taking the new bitmaps. If you had already disposed of them the GPU might not need to clear memory for you.
    There is System.gc(). That will force the system to garbage collect, which you could do at moments that there isn't anything animating.

  • Can you play/view swf files on adobe air for android?

    Hi, yes; I'm new here, as well as to Adobe Air, and I'm still trying to learn the ropes around here, and I apologize in advance if this has already been asked, or I have placed this question in the wrong forum.
    The thing is, I was wondering if it was possible to play my SWF files via adobe air for android; and if so, how? Thanks in advance either way.

    Can you please give directions where can i clear that cash.
    Anyway i don`t think its the case, because this is first time i hooked phone to internet, and first time i launched Android app store.
    Edit:
    I went to https://market.android.com and there is Adobe air app. But when i try to download it says that my device doesn't support it (Samsung Galaxy GT-I5500) By default it comes with android 2.1 and doesn't support Adobe air, but i upgraded firmware to 2.2.
    Maybe that is the reason it doesn't show me Adobe AIR in app store - based on my phone, not my Android version ?

  • Loading SWF's in AIR for iOS

    Hi,
    I am working on a project in AIR for iOS.  It's great that we as flash developers are now able to compile our actionscript code for iOS.
    The project i'm working on is divided in different SWF-files.  There is one master SWF file that loads the others when needed.
    Now i can't get loading of a swf file actually working.  The only thing i see is the background of the child being displayed, but then the program freezes and no actionscript code of the child gets exectuted.
    The children swf's are loaded with a simple Loader:
    var loader:Loader = new Loader();
    childLayer.addChild(loader);
    var url:URLRequest = new URLRequest("child.swf");
    loader.load(url);
    When i publish the master swf file i include the children swf files in the package.
    Is it actually possible to use multiple swf's in your iOS projects?
    And what are the limitations for this?
    Thanks.
    greeting,
    Bert

    You can control your external swf from your main.swf in the following method:
    loadswf(clips[0]);
    function loadswf(tmp:String):void{
        passedString=tmp;
        ldr= new Loader();
        ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
        ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
        ldr.load(new URLRequest(animPath+tmp));
        function progressListener (e:ProgressEvent):void{
            ploader.visible=true;
        function swfLoaded(e:Event):void {
            mcExt = e.target.content as MovieClip;
            ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
            mcExt.addEventListener(Event.ENTER_FRAME,onEnterfn);
            ploader.visible=false;
            addChild(mcExt);
    function onEnterfn(e:Event):void{
        var num:int=mcExt.currentFrame;
        switch(passedString){
            case clips[0]:
                if (num==1) mcExt.play();
                if (num==9) {
                   mcExt.skipmc.addEventListener(MouseEvent.CLICK,skipfn);
                    function skipfn(e:MouseEvent):void{
                        mcExt.stop();
                       mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                        gotoAndStop("help");
                if (num==mcExt.totalFrames){
                   mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                    gotoAndStop("help");
                break;

  • AIR for iOS: How can I distribute for only Retina Displays?

    I am nearing completion of an app I have designed for iOS and tested on my iPhone 4. I bought a 2nd gen iPhone so I could test on both screen resolutions (320x480 and 640x960) before discovering AIR for iOS does not support very old iOS devices (I believe the rule is it must be iOS 4+).
    My question is how is distribution handled if the app will not run on these older models? Wouldn't people with a 2nd gen iPhone still have access to an app that I publish via AIR for iOS and then be angry when it is not supported on their device? Has anyone run into this issue?

    AIR 2.5+ requires iPhone 3GS+ to run. It's based on the CPU inside that
    device and newer which includes a NEON SIMD coprocessor - a requirement
    of newer AIR builds on all platforms (newer than PFI/AIR 2.0, which
    shipped with Flash Pro CS5.0).
    There should be a "resolution" drop down in the AIR for iOS Settings
    dialog, if you updated your PFI in CS5.0 or upgraded to CS5.5. You can
    select "High" to get iPhone retina display support. This will not enable
    iPad 3 retina support though.
    Kevin N.
    Edit: I didn't make it clear that the device requirements are set in your app, and enforced by the App Store - users on old devices will never see your AIR apps in their app store, and if they link into the App Store, they'll get an explaination of why they can't install the app (it'll be either the OpenGL ES 2.0 requirement, or the CPU requirement - it's similar to if you try to install an iPad only app on an iPhone). Android actually works the same way - old/cheap ARMv6 device users will not see your ARMv7 requiring app in their Google Play/Marketplace app.

  • How to record a time-limited video with Adobe AIR for iOS

    I am trying to record a time-limited video with Adobe AIR for iOS.
    For example, I want to implement the following function. Start a one-minute timer before launching CameraUI to record video. When the timeout event happens after one minute, stop recording video, close the CameraUI view and obtain the video data so far.
      I have several questions related to that.
      1. How to stop recording video from outside the CameraUI view(in this case, from the timeout event handler) and then close the CemeraUI view? As far as I know, to close the CameraUI view, the only way is to press the [Use Video] button or the [Cancel] button from inside the CameraUI view. Is it possible to close it from outside?
      2. Even if the first problem mentioned above is solved, then how can I get the video data so far(in this case, the video data before the timeout). I know that normally we can get a MediaPromise object from MediaEvent parameter of the  complete handler, and read the video data from the MediaPromise object. But obviously in this case, we can not access the MediaPromise object just because the complete handler itself will not be executed since the [Use Video] button is not pressed.
      3. Is it possible to add a stopwatch to show possible remaining recording time when CameraUI view is open? It seems that the CameraUI automatically uses the full screen of iOS device(in my case, iPad) and there is no extra space to show the stopwatch.
      Are there any solutions or workarounds about the three problem above? I really appreciate it if anyone has any idea about this. Thanks in advance.

    You'd have more control by using the Camera object, showing the camera on a video object inside a Sprite, and capturing that. Then you could put whatever graphics alongside it on the stage.. I've used FlashyWrappers in a test to capture the video to the library.  It took some work, but the test worked well...
    Flash/AIR record videos of your apps and games: Rainbow Creatures

  • How to embed and launch ipa file from another ipa package created using Air for iOS

    Hi Guys,
    Anybody out there knowing how to embed and launch ipa file from another ipa package created using Air for iOS ?
    I am having 1 ipa file created using Xcode, Now i need to include that file in my ipa Package which is created using Flash CS 5.5 and Air for iOS. Also i need to know how to open my 1st ipa file from AS3 ?
    Thanks,

    Hi Sir,
    Thanks for your reply.
    But in that case user need to download 2 applications right. I need user to download my parent application created using Flash and that package contain one more ipa created using Xcode, so from my parent app only user should able to open my 2nd app. Is there any way to do that?
    Ps:  I am not talking about in-app but 2 individual apps inside one package.

  • How many of the apps on the app store are based on AIR for iOS? raw numbers? as a percentage?

    wondering how apps based on the AIR for iOS platform are doing out there in the "real world"
    thanks

    ur restrictions might have been turned on. how? no clue. but that is normally the only reason default apps are not showing on the homescreen.
    u can reset ur home screen layout and see if that helps, turn off restrictions first of course.
    my suggestion... however, is to just reset all settings to get everything at once so to speak. there might have been other settings that were changed on ur ipad that u havnt noticed yet. the reset all settings would get those back to factory default as well.
    to get to those settings
    restrictions: settings>general>restrictions
    reset home screen layout: settings>general>reset>reset homescreen layout
    reset all settings: settings>general>reset>reset all settings

  • How to load external swf and handle events of external swf by passing data .

    Hi all
    I have to laoad external swf (made in flash).On loading i have to pass data and hndle events which occurs on this swf.
    Can any one suggest me how can I achieve this.
    Regards
    Munira

    Here is one way:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f9c.html
    HTH,

  • How to load External swf file in AIR

    I try this code its working in computer but when I publish this file in .apk or .ipa , my external swf file is not opening
    (I include my external file as well)
    places_btn.addEventListener(MouseEvent.MOUSE_DOWN, newvid);
    function newvid(event:MouseEvent) {
         trace("you clicked me");
         var loadit = new Loader();
         addChild(loadit);
         loadit.load(new URLRequest("scene02.swf"));

    thx boss its working great
    I have 3 scenes; load scene code is working great
    1. How can I unload the scene?
    2. Can I unload all scenes or one by one?
    can I unload some think like this
    Load scene 2 , unload scene 1 and scene 3
    Load scene 3, unload other all scene
    i try this
    load2.addEventListener(MouseEvent.MOUSE_DOWN, newvid);
    function newvid(event:MouseEvent) {
              trace("you clicked me");
              var loadit = new Loader();
              addChild(loadit);
        var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
        loadit.load(new URLRequest("scene02.swf"), _lc);
              loadit.unload();
    load3.addEventListener(MouseEvent.MOUSE_DOWN, newvid1);
    function newvid1(event:MouseEvent) {
              trace("you clicked me");
              var loadit = new Loader();
              addChild(loadit);
        var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
        loadit.load(new URLRequest("scene03.swf"), _lc);
              loadit.unload("scene01.swf scene02.swf");

Maybe you are looking for