Let's get down to brass tax.
Grant's post is not some bug report and everyone at Adobe knows it.
Coming on here and trying to downplay it isn't going to get you very far
because people are going to call bullshit. It's a major problem for
Adobe for this to be made public and one reason it was made public is
because the Flash team wouldn't admit it or fix it. It's not a good
idea to lie to your development community.
The Flash team knows what they did. They shouldn't have made this bad
engineering decision and now they are in a bind because there's no going
back and the best they can do is try and provide a usable workaround in
the form of memory sandboxing. Weak (no pun intended).
The rule for unloading a swf is that you have to remove all references,
stop all timelines, stop all sounds, stop all timers, stop any enter
frame listeners, etc, only then will it be allowed to unload. This
requirement set up the situation where you cannot run a trace inside the
swf to prove that it still exists in memory, otherwise, you've violated
the requirement that allows a swf to unload. Interesting, huh?
This is the very thing that the Flash team has relied upon to shield
themselves from this being exposed. If you can't prove it, they don't
have to fix it because they've got plausible deniability. The GC is
completely hidden from developers, which only compounds the issue. Of
course, this lack of transparency of the GC is by design, and that
discussion is out of the scope of this conversation.
This is the Flash team's dirty secret. They don't actually unload your
swf. But, if you stop all timelines, scripts, and clear all references
then to the casual observer it appears that your clip is unloaded
because you have no "solid" way of proving otherwsie. Crafty, but not
crafty enough. Unfortunately for the Flash player team, some smart
developers figured out a way to prove what's really going on, and
because of their continued denials and refusal to fix it because of the
difficulty in doing so, their dirty little secret has been exposed.
The fact of the matter is, if your references are within the scope of
the swf, and you unload the swf, then the swf and everything inside it
should unload. You shouldn't have to turn off anything inside a swf if
its scope stays within the swf. You shouldn't have to call stop() on
all timelines inside a swf that you're trying to unload, either. AS2
let you do it, so should AS3.
I don't know how Adobe, in good conscience, could be pushing newbie
developers to learn AS3.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders