From 6bbe0d8ce3ad7adfcb2b95f12aa5db8eeece999c Mon Sep 17 00:00:00 2001 From: "Unknown (aruna1)" <dev-null@apache.org> Date: Mon, 17 Apr 2000 21:55:04 +0000 Subject: [PATCH] Rectified memory leak caused by allocation od identifier in the class ctor. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@172056 13f79535-47bb-0310-9956-ffa450edef68 --- src/dom/DocumentImpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dom/DocumentImpl.cpp b/src/dom/DocumentImpl.cpp index 8efe2ab8e..21a770767 100644 --- a/src/dom/DocumentImpl.cpp +++ b/src/dom/DocumentImpl.cpp @@ -147,6 +147,7 @@ DocumentImpl::DocumentImpl(const DOMString &fNamespaceURI, docElement=null; appendChild(createElementNS(fNamespaceURI, qualifiedName)); //root element namePool = new DStringPool(257); + identifiers = new RefHashTableOf<PoolElem>(109); iterators = 0L; treeWalkers = 0L; } @@ -163,6 +164,10 @@ DocumentImpl::~DocumentImpl() // The data in the vector is pointers owned by smart pointers, and will be cleaned up when they go away. delete treeWalkers; } + + if (identifiers != 0L) { + delete identifiers; + } delete namePool; // Do not delete docType and docElement pointers here. -- GitLab