diff options
Diffstat (limited to 'libxsde/xsde/cxx/hybrid/sequence.hxx')
-rw-r--r-- | libxsde/xsde/cxx/hybrid/sequence.hxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libxsde/xsde/cxx/hybrid/sequence.hxx b/libxsde/xsde/cxx/hybrid/sequence.hxx index 451c76d..fa5c697 100644 --- a/libxsde/xsde/cxx/hybrid/sequence.hxx +++ b/libxsde/xsde/cxx/hybrid/sequence.hxx @@ -22,6 +22,10 @@ # include <xsde/cxx/string-sequence.hxx> #endif +#ifdef XSDE_CUSTOM_ALLOCATOR +# include <xsde/cxx/allocator.hxx> +#endif + namespace xsde { namespace cxx @@ -831,7 +835,15 @@ namespace xsde public: struct guard { - ~guard () { delete p_; } + ~guard () + { +#ifndef XSDE_CUSTOM_ALLOCATOR + delete p_; +#else + cxx::free (p_); +#endif + } + guard (T* p) : p_ (p) {} void |