[Mobies-commit] [commit] r3643 - UDM/trunk/src/UdmDom
endre at redhat1.isis.vanderbilt.edu
endre at redhat1.isis.vanderbilt.edu
Fri Feb 18 14:05:43 CST 2011
Author: endre
Date: Fri Feb 18 14:05:43 2011
New Revision: 3643
Log:
Fix a memory leak with string based DOM data networks
Modified:
UDM/trunk/src/UdmDom/UdmDom.cpp
Modified: UDM/trunk/src/UdmDom/UdmDom.cpp
==============================================================================
--- UDM/trunk/src/UdmDom/UdmDom.cpp Fri Feb 18 14:04:25 2011 (r3642)
+++ UDM/trunk/src/UdmDom/UdmDom.cpp Fri Feb 18 14:05:43 2011 (r3643)
@@ -3939,6 +3939,8 @@
TRY_XML_EXCEPTION
+ parser->reset();
+
bool force_dtd = false; //default is xsd
if (metalocator.size() > 4)
{
@@ -4133,11 +4135,12 @@
UDM_DLL void DomDataNetwork::CloseNoUpdate()
{
TRY_XML_EXCEPTION
+
// We must delete doc if the dn was created via CreateNew
if (parser->getDocument() == NULL) {
DOMElement *de = static_cast<DomObject *>(GetRootObject().__impl())->dom_element;
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc = de->getOwnerDocument();
- delete doc;
+ doc->release();
}
rootobject = NULL;
@@ -4177,7 +4180,7 @@
if (parser->getDocument() == NULL) {
- delete doc;
+ doc->release();
}
rootobject = NULL;
More information about the Mobies-commit
mailing list