From: Scott Cantor Date: Fri, 10 Feb 2012 20:29:36 +0000 (+0000) Subject: Fix legacy XMLString release call X-Git-Tag: 1.5.0~29 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=faaf2a9a49c38235306e11019f3edca1a7718fc8 Fix legacy XMLString release call --- diff --git a/xmltooling/AbstractComplexElement.cpp b/xmltooling/AbstractComplexElement.cpp index 9c7a276..a8e68ef 100644 --- a/xmltooling/AbstractComplexElement.cpp +++ b/xmltooling/AbstractComplexElement.cpp @@ -54,10 +54,21 @@ AbstractComplexElement::AbstractComplexElement(const AbstractComplexElement& src } AbstractComplexElement::~AbstractComplexElement() { +#ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE + static void (*release)(XMLCh**) = &XMLString::release; +#else static void (*release)(XMLCh**,MemoryManager*) = &XMLString::release; +#endif for_each(m_children.begin(), m_children.end(), cleanup()); - for_each(m_text.begin(), m_text.end(), lambda::bind(release, &_1, XMLPlatformUtils::fgMemoryManager)); + for_each(m_text.begin(), m_text.end(), + lambda::bind( + release, &_1 +#ifndef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE + ,XMLPlatformUtils::fgMemoryManager +#endif + ) + ); } bool AbstractComplexElement::hasChildren() const