[ 
https://issues.apache.org/jira/browse/XERCESJ-1299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ludger Bünger updated XERCESJ-1299:
-----------------------------------

    Attachment: WeakNodeIteratorArrayList.txt

I have it right here at hand (also for NodeIterators -> see attached Patch).

Maybe it inspires somehow but to me it looks roughly equivalent.

Main difference is that I used an ArrayList instead of a LinkedList.
The main advantage of the linked list we require here is the constant time 
entry removal.
I worked around this by copying the last entry to the to-be-removed position so 
that no array copying (usually taking O(n) processing time) is done.

Since there is no order defined upon iterator notification (same with range 
notification) I think this is ok.

> NodeIterators should be garbage collectable if the node iterators are not 
> referenced by the main application anymore.
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1299
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1299
>             Project: Xerces2-J
>          Issue Type: Improvement
>          Components: DOM (Level 2 Traversal & Range)
>    Affects Versions: 2.9.1
>            Reporter: Ludger Bünger
>            Assignee: Michael Glavassevich
>            Priority: Trivial
>             Fix For: 2.10.0
>
>         Attachments: WeakNodeIterator.txt, WeakNodeIteratorArrayList.txt
>
>
> NodeIterators should be garbage collectable if the node iterators are not 
> referenced by the main application anymore.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to