Weak references and destructors
charles at sproutit.com
Thu Dec 10 10:11:08 PST 2009
That looks pretty much right on. Thanks Tom! Can anyone give any insight as to how likely it is this might actually happen?
On Dec 10, 2009, at 10:03 AM, Tom Van Cutsem wrote:
> I think what you are looking for is this:
> On Thu, Dec 10, 2009 at 9:44 AM, Charles Jolley <charles at sproutit.com> wrote:
> I was wondering if any thought has gone into adding weak references and destructors to Harmony.
> We are finding that as we build large, long running JS apps, it is very hard to keep memory under control using the built-in GC since any reference - even for caching - will prevent the memory from being reclaimed.
> If we had a way to keep weak references for caches, the GC could reclaim a lot more of our memory automatically. If a destructor were called before an object was dealloc'ed, we could clean up caches and tear down additional references, possibly allowing further memory to be reclaimed as well.
> Of course I can implement something like explicit reference counting in existing ES engines to get around this but then we lose many of the benefits of automated GC.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss