Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
Has any staff checked this case?
Copy link to clipboard
Copied
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 ?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
As I see dai1231 don't use IOS platform, and it's possible to strip swfs when compiling for IOS.
Copy link to clipboard
Copied
This practice is introduced to cross-platform(Including ios that is right).
But Now my alternative is never to destroy them.