You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/05/02 16:19:49 UTC

DO NOT REPLY [Bug 8741] New: - Support for garbage collection in IDOM implementation

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8741>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8741

Support for garbage collection in IDOM implementation

           Summary: Support for garbage collection in IDOM implementation
           Product: Xerces-C++
           Version: 1.7.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: DOM
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: fekete@cs.umd.edu


Currently, the memory model of the IDOM is performant but doesn't free memory 
until the document is freed.
Looking at the implementation, it seems very simple to add an optional support 
for the Boehm-Demers-Weiser garbage collector 
(http://www.hpl.hp.com/personal/Hans_Boehm/gc/) or any other garbage collector 
package.  This could be done by moving the allocation mechanism performed by 
the IDOMDocumentImpl into an allocator object, not an STL allocator but one 
that matches the current allocation mechanism performed by IDOMDocumentImpl.  
You could then provide by default the standard allocator and describe in an 
example how to change it for an allocator that uses garbage collection.

I am a fan of garbage collection with C++ since it simplifies programming a lot 
and increases performance by avoiding reference counting while still releasing 
memory.  It seems that the IDOM interface simplifies a lot memory management 
but for applications that perform heavy changes to a document, memory rapidly 
becomes an issue.

-- 
   Jean-Daniel Fekete           fekete@cs.umd.edu
   Invited Professor, HCIL      tel: 301-405-4116
   Dept of Computer Science     fax: 301-405-6707
   University of Maryland, College Park, MD 20742

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org