Skip to main content
dai1231
Participating Frequently
January 16, 2016
Question

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

  • January 16, 2016
  • 3 replies
  • 790 views

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 has been closed for replies.

3 replies

dai1231
dai1231Author
Participating Frequently
April 24, 2016

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

But Now my alternative is never to destroy them.

lagoon_bbo
Known Participant
January 26, 2016

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 ?

natural_criticB837
Legend
January 26, 2016

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.

lagoon_bbo
Known Participant
January 27, 2016

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

dai1231
dai1231Author
Participating Frequently
January 26, 2016

Has any staff checked this case?