=== modified file 'dcpp/Pointer.h' --- dcpp/Pointer.h 2009-08-15 04:40:26 +0000 +++ dcpp/Pointer.h 2010-08-13 21:03:04 +0000 @@ -20,7 +20,7 @@ #define DCPLUSPLUS_DCPP_POINTER_H #include -#include "Thread.h" +#include namespace dcpp { @@ -36,10 +36,10 @@ intrusive_ptr_base() throw() : ref(0) { } private: - friend void intrusive_ptr_add_ref(intrusive_ptr_base* p) { Thread::safeInc(p->ref); } - friend void intrusive_ptr_release(intrusive_ptr_base* p) { if(Thread::safeDec(p->ref) == 0) { delete static_cast(p); } } + friend void intrusive_ptr_add_ref(intrusive_ptr_base* p) { ++p->ref; } + friend void intrusive_ptr_release(intrusive_ptr_base* p) { if(--p->ref == 0) { delete static_cast(p); } } - volatile long ref; + boost::detail::atomic_count ref; };