gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/key_eve...


From: Sandro Santilli
Subject: Re: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/key_eve...
Date: Tue, 10 Jul 2007 05:12:01 +0200

On Tue, Jul 10, 2007 at 11:07:00AM +0800, zou lunkai wrote:
> The above testcase does something like this:
> 
> obj = new Object();
> obj.onKeyDown = function ()  { };
> Key.addListener(obj);
> delete obj;
> 
> The observed behavious is:
> After deleting 'obj', the onKeyDown event handler could still be
> invoked.  So I think the created object is still alive, but without an
> explicit reference.
> 
> I'd like to know how GC would deal with this.  Knowing this would
> help me find a general solution to fix bug #20317.

Ok. Currently we do NOT keep key listeners alive, assuming they'd
deregister themselves on destruction. Since you're reporting this
is NOT the case, the movie_root::markReachableResources (or the 
Key::markReachableResources
in case it relies on the existance of the global Key object) must 
be changed to keep listeners alive (mark them as reachable).

See also: http://www.gnashdev.org/wiki/index.php/MemoryManagement#Listeners

Just wondering: does it mean that in the above case the user
has NO way to release the resources associated with that object ?

--strk;




reply via email to

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