Skip to main content
dai1231
Participating Frequently
Jan 16, 2016 8:29 AM UTC
Question

Issues with Air 20 Testing, Child SWF's root Sprite can't be unloaded.

Hi all,

I got a problem.

when I set applicationDomain = ApplicationDomain.currentDomain to loader.

And The child SWF's root Sprite had a Class,but parent SWF without this Class.

Do Repeat reloading and watching profiler.

Profiler indicates the number of SWF's root Sprite which is Continuously rising.

This represents a memory leak.

81 times to reload & this profile is shown below.

All other memory can be controlled well, except for SWF's root Sprite & related objects.

this behavior is normal?

Or Is there any way to solve?

(This testing is on desktop platform with Air 20  & releas mode.)

The same test is good working for setting applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain).

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

dai1231
dai1231Author
Participating Frequently
Apr 24, 2016 8:19 AM UTC

This practice is introduced to cross-platform(Including ios that is right).

But Now my alternative is never to destroy them.

Translate
lagoon_bbo
Known Participant
Jan 26, 2016 1:18 PM UTC

Hi, I usually never add something to the root of loaded SWFs as they seems to be played right after the load complete even if you don't use them.

I prefer keep the root empty and export all needed clips for actionscript with linkage name, this way I can use the objects I want when I want.

After that maybe you have other errors as I see you have lot of Loader instance to.

Can you post the code you use to load and unload your swfs ?

Translate
natural_criticB837
Legend
Jan 26, 2016 5:12 PM UTC

The problem is (to my knowledge) that you can not give linkage names on iOS for remotely hosted swf files, so putting the content on the root is the only way to remotely load graphical assets into the application. So this might indeed pose a problem.

Translate
lagoon_bbo
Known Participant
Jan 27, 2016 6:33 AM UTC

As I see dai1231 don't use IOS platform, and it's possible to strip swfs when compiling for IOS.

Translate
dai1231
dai1231Author
Participating Frequently
Jan 26, 2016 3:12 AM UTC

Has any staff checked this case?

Translate