I'm a little confused about boost's intrusive pointer. The definition says:
"Every new
intrusive_ptr
instance increments the reference count by using an unqualified call to the functionintrusive_ptr_add_ref
, passing it the pointer as an argument. Similarly, when anintrusive_ptr
is destroyed, it callsintrusive_ptr_release
; this function is responsible for destroying the object when its reference count drops to zero. The user is expected to provide suitable definitions of these two functions. "
Does this mean that I HAVE TO implement these methods, or that I CAN do it? The point is, that we're using it because a function requires an intrusive pointer. We've used shared pointer the other places, so were just worried if the pointer is managed, and is going to be deleted when theres no more references to it.