gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash ChangeLog server/button_character_instanc...


From: strk
Subject: Re: [Gnash-commit] gnash ChangeLog server/button_character_instanc...
Date: Thu, 19 Apr 2007 21:00:45 +0200

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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]