W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2014

[whatwg] BroadcastChannel memory leak

From: Adam Barth <w3c@adambarth.com>
Date: Fri, 23 May 2014 17:23:36 -0700
Message-ID: <CAJE5ia9JvSy9yhkt+Y6GQL+M2jTp8JqM4CVxynpamZfL+haw=w@mail.gmail.com>
To: whatwg <whatwg@lists.whatwg.org>
When is it safe for a user agent to garbage collect a BroadcastChannel instance?


Given that another document might create a new BroadcastChannel
instance at any time, the |message| event of the object might fire any
time its responsible document is fully active.  For web application
that have long-lived documents, the BroadcastChannel might not be
eligible for garbage collection for a long time.

Proposal: Add a |close| method to the BroadcastChannel interface
similar to the |close| method on MessagePort.  The |close| method
would just neuter the instance of the channel and prevent it from
receiving further messages.

Received on Saturday, 24 May 2014 00:33:06 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:20 UTC