- From: Vidur Apparao <vidur@netscape.com>
- Date: Wed, 06 May 1998 09:33:52 -0700
- To: Don Park <donpark@quake.net>
- CC: www-dom@w3.org
Don Park wrote: > The problem is that the current design directly causes faulty implementation > in Java. One specific interface I am concerned about is NodeIterator. > Latest change made it impossible to implement it without causing unused > NodeIterators to pile up. The choice is to either change the API again to > relieve the need to keep track of NodeIterators from Node or add 'release' > method to NodeIterator. 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. --Vidur
Received on Wednesday, 6 May 1998 12:33:57 UTC