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>
Vidur,

>My impression is that you could use weak references in Java (see
>java.lang.ref.WeakReference) to deal with your accumulation problem. Your
Node
>implementation could hold on to its NodeIterators using weak references.
The
>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
GC.

Don Park
http://www.docuverse.com/personal/index.html
Received on Wednesday, 6 May 1998 12:54:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT