ui-gxmlcpp  1.4.4
Util.hpp
Go to the documentation of this file.
1 
10 #ifndef UI_GXML_UTIL_HPP
11 #define UI_GXML_UTIL_HPP
12 
13 // STDC++
14 #include <cassert>
15 
16 // C libraries
17 #include <libxml/globals.h>
18 
19 // C++ libraries
20 #include <ui-utilcpp/Misc.hpp>
21 
22 namespace UI {
23 namespace GXML {
24 
26 template <typename P>
27 class auto_xmlfree: public UI::Util::auto_base<P>
28 {
29 public:
31  auto_xmlfree(P * const p)
32  :UI::Util::auto_base<P>(p)
33  {}
34 
36  virtual ~auto_xmlfree()
37  {
38  xmlFree(UI::Util::auto_base<P>::p_);
39  }
40 };
41 
42 }}
43 #endif
Control freeing of memory via xmlFree.
Definition: Util.hpp:27
Namespace for all Schlund+Partner Code.
Definition: Buffer.cpp:30
auto_xmlfree(P *const p)
Control this memory allocated via std::*alloc.
Definition: Util.hpp:31
virtual ~auto_xmlfree()
Free memory via std::free.
Definition: Util.hpp:36