diff options
author | Adrian Kummerlaender | 2014-07-07 22:25:03 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2014-07-07 22:25:03 +0200 |
commit | 8f05c7de54336daefb214a754de35367098b6510 (patch) | |
tree | fc8d2b8309c88a1e57193784ad4f48bfa573952d /src/support/dom/document_cache_item.cc | |
parent | be99b28838796ff5e1dc91685d6121a55d962a88 (diff) | |
download | InputXSLT-8f05c7de54336daefb214a754de35367098b6510.tar InputXSLT-8f05c7de54336daefb214a754de35367098b6510.tar.gz InputXSLT-8f05c7de54336daefb214a754de35367098b6510.tar.bz2 InputXSLT-8f05c7de54336daefb214a754de35367098b6510.tar.lz InputXSLT-8f05c7de54336daefb214a754de35367098b6510.tar.xz InputXSLT-8f05c7de54336daefb214a754de35367098b6510.tar.zst InputXSLT-8f05c7de54336daefb214a754de35367098b6510.zip |
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
Diffstat (limited to 'src/support/dom/document_cache_item.cc')
-rw-r--r-- | src/support/dom/document_cache_item.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/support/dom/document_cache_item.cc b/src/support/dom/document_cache_item.cc index 9798bfa..a684d97 100644 --- a/src/support/dom/document_cache_item.cc +++ b/src/support/dom/document_cache_item.cc @@ -2,20 +2,16 @@ namespace InputXSLT { -DomDocumentCache::item::item(xercesc::DOMDocument* document): +DomDocumentCache::item::item(document_ptr&& document): + document_(std::move(document)), parser_(), dom_support_(parser_), - document_(document), parsed_source_( - document_, + document_.get(), parser_, dom_support_ ) { } -DomDocumentCache::item::~item() { - this->document_->release(); -} - xalan::XalanDocument* DomDocumentCache::item::getXalanDocument() { return this->parsed_source_.getDocument(); } |