On Tue, Jul 10, 2007 at 06:24:22AM -0600, Eric Hughes wrote:
> At 09:07 PM 7/9/2007, zou lunkai wrote:
> >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.
> 
> Mr. Broken Record Man here.  If the reference to 'obj' that 
> 'Key.addListener' stores were a weak reference, then this would all work 
> without further ado.  If I'm counting right, this is the third use case 
> I've mentioned.

No, zou is saying that the event handler is *supposed* to be invoked.
Not a gnash bug, rather, an expected behaviour. So the pointer must
not be weak.

Anyway, if you can start a wiki page with all these 'cases' it
will help when we will switch from intrusive to shared ptr.
(I can only think of a single case right now, being mouse entities)

--strk;


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

Reply via email to