Closed Bug 1040023 Opened 10 years ago Closed 8 years ago

Broadcast event queues must hold their targets weakly

Categories

(Firefox Graveyard :: Shumway, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: till, Assigned: mbx)

References

Details

Currently, any DisplayObject that has any frame event listeners is strongly held by the broadcastEventDispatchQueue. Instead, they have to be weakly held.

Consider this test case (only works in the IDE or debug player):

var clip:MovieClip = new MovieClip();
clip.addEventListener(Event.FRAME_CONSTRUCTED, function() {trace('constructed')});
clip = null;
flash.system.System.gc();

In the Flash Player, this doesn't trace at all, whereas we keep tracing indefinitely.
I will try to see if I can use MovieClip reference counts to remove the event handlers from the `broadcastEventDispatchQueue`.
Assignee: nobody → mbebenita
Blocks: shumway-m3
Priority: -- → P3
Priority: P3 → P2
We might not need to fix this for ads: they play for 30 seconds and then stop, so there's probably not much need for weak listeners, etc. Moving to m5 for now.
Blocks: shumway-m5
No longer blocks: shumway-m3
Product: Firefox → Firefox Graveyard
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.