Dieter Maurer dieter@handshake.de
Sun, 25 Apr 1999 21:40:19 +0000 (/etc/localtime)

Paul Prescod writes:
 > The problem with close() is that it is O(N) with the size of your
 > document, isn't it? I'm on the fence about parent pointers...maybe they
 > should be a construction option. They would be off by default.
But there is no difference in runtime behavior (O(N)),
whether the close() is explicite or implicite (i.e. because
the reference count reaches 0).

The real problem with an explicite close() are dangling
references. Assume, the application has a reference to
an inner node in the document tree. The close() would
probably remove all parent pointers from the subtree
(this is very similar (a bit worse) to what would happen,
if weakdicts would be used for parent pointer implementation).

- Dieter