You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/12/21 18:01:23 UTC
cvs commit: xml-xerces/c/src/dom ElementImpl.cpp
tng 01/12/21 09:01:23
Modified: c/src/dom ElementImpl.cpp
Log:
[Bug 5466] Memory Leak: ElementImpl.cpp's ElementImpl::ElementImpl does not cleanup attributes before
assignment. Fixed by Frank Balluffi.
Revision Changes Path
1.34 +8 -1 xml-xerces/c/src/dom/ElementImpl.cpp
Index: ElementImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/dom/ElementImpl.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- ElementImpl.cpp 2001/12/07 01:35:28 1.33
+++ ElementImpl.cpp 2001/12/21 17:01:23 1.34
@@ -55,7 +55,7 @@
*/
/*
- * $Id: ElementImpl.cpp,v 1.33 2001/12/07 01:35:28 tng Exp $
+ * $Id: ElementImpl.cpp,v 1.34 2001/12/21 17:01:23 tng Exp $
*/
#include "DeepNodeListImpl.hpp"
@@ -90,7 +90,14 @@
if (deep)
cloneChildren(other);
if (other.attributes != null)
+ {
+ if (attributes)
+ {
+ attributes->removeAll();
+ NamedNodeMapImpl::removeRef(attributes);
+ }
attributes = other.attributes->cloneAttrMap(this);
+ }
};
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org