W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: onEnded and connections

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 5 Sep 2013 17:26:58 +1200
Message-ID: <CAOp6jLZyEiKbiCS0qbfZBy6=U5O_RCJogHehKW5yooNAYj7u5Q@mail.gmail.com>
To: "K. Gadd" <kg@luminance.org>
Cc: Raymond Toy <rtoy@google.com>, Chris Wilson <cwilso@google.com>, "public-audio@w3.org" <public-audio@w3.org>
On Thu, Sep 5, 2013 at 5:16 PM, K. Gadd <kg@luminance.org> wrote:

> How is this resolved to prevent observability of GC? Any source node that
> has been started lives until it stops playing, even if it is not connected
> to the graph and not retained anywhere, in order to fire the ended event at
> the appropriate time?
>

Yes, although if there are no listeners and the JS wrapper goes away then
the node can be collected safely before it ends.

That's the only solution I can think of, and it seems like that has a
> downside in that it makes it trivial to create an accidental memory leak
> where a GCable object is mysteriously not getting GC'd despite not being
> retained by user code.
>

There are already quite a few ways to do that unfortunately. Detecting
every case where an AudioNode can be safely collected is very challenging.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
Received on Thursday, 5 September 2013 05:27:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:10 UTC