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

Re: Hello and NodeIterator Revisited

From: Torben Espersen <torbene@diku.dk>
Date: Thu, 07 May 1998 10:42:16 +0100
Message-ID: <355181F8.9470E884@diku.dk>
To: www-dom@w3.org
Don Park wrote:

> 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.

Although I am not deep into this ongoing discussion, I will add my comments
>From an outsiders point of view it seems, you hit the usual problem of
reuse of objects. From a practical view it is desirable to achieve good
so explicit reuse in the API would be appropriate. From an API view I would
this be rather poor practice, because it will move the burden of memory
to the API programmer (once again). Recycling of these kinds of small objects,
should be handled by the memory manager in conjunction with the garbage
The mem-man could detect intensive allocation/deallocation of certain objects
apply a recycling scheme.

Torben Espersen

Unite for Java - Join the Java Lobby!
Received on Thursday, 7 May 1998 05:25:51 UTC

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