From 8f05c7de54336daefb214a754de35367098b6510 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 7 Jul 2014 22:25:03 +0200 Subject: Implemented custom xercesc::DOMDocument deleter * pointers to xercesc::DOMDocument were manually released ** this is now solved using a custom deleter for the appropriate std::unqiue_ptr template specialization * added matching factory method to DomDocumentCache * updated external function implementations accordingly ** "constructDocument" is now expected to return a DomDocumentCache::document_ptr instance * updated TransformerFacade accordingly * this change was implemented to get rid of the manual memory management required by xalan / xerces --- src/support/dom/document_cache_item.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/support/dom/document_cache_item.h') diff --git a/src/support/dom/document_cache_item.h b/src/support/dom/document_cache_item.h index 13fddfc..ebc9172 100644 --- a/src/support/dom/document_cache_item.h +++ b/src/support/dom/document_cache_item.h @@ -14,19 +14,17 @@ namespace InputXSLT { class DomDocumentCache::item { public: - ~item(); - xalan::XalanDocument* getXalanDocument(); protected: friend DomDocumentCache; - item(xercesc::DOMDocument*); + item(document_ptr&&); private: + document_ptr document_; xalan::XercesParserLiaison parser_; xalan::XercesDOMSupport dom_support_; - xercesc::DOMDocument* const document_; xalan::XercesDOMWrapperParsedSource parsed_source_; }; -- cgit v1.2.3