From e28689237d92210f22c12ffc59b1b6ee569fdb07 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 30 Oct 2007 10:08:09 +0000 Subject: [PATCH] uses checked_delete instead of plain delete --- include/libtorrent/intrusive_ptr_base.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/intrusive_ptr_base.hpp b/include/libtorrent/intrusive_ptr_base.hpp index 98a1fed2e..5cccdf827 100644 --- a/include/libtorrent/intrusive_ptr_base.hpp +++ b/include/libtorrent/intrusive_ptr_base.hpp @@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_INTRUSIVE_PTR_BASE #include +#include #include "libtorrent/config.hpp" #include "libtorrent/assert.hpp" @@ -60,7 +61,7 @@ namespace libtorrent TORRENT_ASSERT(s->m_refs > 0); TORRENT_ASSERT(s != 0); if (--s->m_refs == 0) - delete static_cast(s); + boost::checked_delete(static_cast(s)); } boost::intrusive_ptr self()