summaryrefslogtreecommitdiff
path: root/libxsd/xsd/cxx/xml/std-memory-manager.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-01-19 10:05:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-01-19 10:06:32 +0200
commit0fdf19714613a82a184f4f6e75fb9a4f9b62f18a (patch)
tree93bb2df0f9d9eab44d36dedf29d4df500ecefcbc /libxsd/xsd/cxx/xml/std-memory-manager.hxx
parent45db924dfc19b49b7930522dbddd123fb9575e32 (diff)
Use std::unique_ptr instead of std::auto_ptr in C++11 mode
Diffstat (limited to 'libxsd/xsd/cxx/xml/std-memory-manager.hxx')
-rw-r--r--libxsd/xsd/cxx/xml/std-memory-manager.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/libxsd/xsd/cxx/xml/std-memory-manager.hxx b/libxsd/xsd/cxx/xml/std-memory-manager.hxx
index bd8fbab..00012fd 100644
--- a/libxsd/xsd/cxx/xml/std-memory-manager.hxx
+++ b/libxsd/xsd/cxx/xml/std-memory-manager.hxx
@@ -18,6 +18,8 @@ namespace xsd
class std_memory_manager: public xercesc::MemoryManager
{
public:
+ // Xerces-C++ MemoryManager interface.
+ //
virtual void*
allocate(XMLSize_t size)
{
@@ -36,6 +38,15 @@ namespace xsd
{
return xercesc::XMLPlatformUtils::fgMemoryManager;
}
+
+ // Standard deleter interface.
+ //
+ void
+ operator() (void* p) const
+ {
+ if (p)
+ operator delete (p);
+ }
};
}
}