Re: onEnded and connections

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