W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2001

RE: NamedNodeMap

From: Fred L. Drake, Jr. <fdrake@acm.org>
Date: Wed, 11 Jul 2001 17:28:26 -0400 (EDT)
Message-ID: <15180.50426.742056.360226@cj42289-a.reston1.va.home.com>
To: "Allen, Michael B (RSCH)" <Michael_B_Allen@ml.com>
Cc: www-dom@w3c.org

Allen, Michael B (RSCH) writes:
 > I don't think Memory Management would be an issue. In your
 > destroyNode function you remove the list of NodeLists and if it's
 > not NULL remove the entry from each . Then free the node per usual.

 > I'm not really sure what you mean by object lifetime issues
 > though. Do you mean their liftimes would be so short that all the
 > extra machinery becomes silly? I agree, but I see no alternative.

  I don't know that it would be a problem for you (I vaguely recall
you said you were working in C or C++), but it could be a problem for
garbage-collected system.  Circular references were considered a huge
problem in older versions of Python because it used only reference
counting for GC, and even today the cycle detector is optional (it
*does* have a performance penalty, as all "real" GC systems do).
With non-refcount GC, there can be a lack of temporal proximity
between an object becoming garbage and being collected; unless you
collect frequently (higher overhead), you can accumulate an enormous
amount of garbage very quickly if you use a lot of temporary objects.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations
Received on Wednesday, 11 July 2001 17:30:26 GMT

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