W3C home > Mailing lists > Public > www-dom@w3.org > April to June 1998

Re: Hello and NodeIterator Revisited

From: Don Park <donpark@quake.net>
Date: Wed, 6 May 1998 09:47:39 -0700
Message-ID: <009801bd790e$b05a68a0$2ee044c6@arcot-main>
To: <www-dom@w3.org>

>My impression is that you could use weak references in Java (see
>java.lang.ref.WeakReference) to deal with your accumulation problem. Your
>implementation could hold on to its NodeIterators using weak references.
>NodeIterators would be GC'd when the last "external" reference was dropped.

Well, it turns out that weak references are not needed.  The real problem I
see at this point is that NodeIterators are used too often without any
facility for recycling.  One NodeIterator is instantiated for each Element
with children and another is needed to iterate attributes.  This is
sufferable if each elements are relatively heavy but if elements are being
used like the way HTML is being used, you can expect quite a trashing from

Don Park
Received on Wednesday, 6 May 1998 12:54:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC