uses checked_delete instead of plain delete
This commit is contained in:
parent
df7e01ff8a
commit
e28689237d
|
@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#define TORRENT_INTRUSIVE_PTR_BASE
|
||||
|
||||
#include <boost/detail/atomic_count.hpp>
|
||||
#include <boost/checked_delete.hpp>
|
||||
#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<T const*>(s);
|
||||
boost::checked_delete(static_cast<T const*>(s));
|
||||
}
|
||||
|
||||
boost::intrusive_ptr<T> self()
|
||||
|
|
Loading…
Reference in New Issue