On Thu, Apr 19, 2007 at 07:47:51PM +0200, Udo Giacomozzi wrote:

> The old sprite_instance-based implementation stored the result of
> getTarget() and getTargetPath() in a local variable for faster
> subsequent accesses. However, I removed this cache while moving the
> functions to character because:
> 
>  - changing character's parent (is that allowed?) would void the
>    cached target and lead to unexpected results

Changing the character's parent is not allowed.
Changing the character's _parent._name is, which would also be
harder to handle by any cache.

>  - this was a known risk and the old implementation included an
>    assert() that caused re-calculation of the path anyway

It's incredible the assert() didn't help finding the above possibility.
I committed a testcase for this in MovieClip.as now.
It shows that _target can change, and also (sic) detects a flake in
our current "soft references" ('movieclip' typed as_values)

--strk;


_______________________________________________
Gnash-commit mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-commit

Reply via email to