문제

I once heard that it is possible to map the Boost shared_ptr or intrusive_ptr reference add and release functions to my own implementations of add and release reference functions.

Is this really possible? If yes, can anyone point me to some resources regarding this feature?

Thanks!

도움이 되었습니까?

해결책

Not with shared_ptr itself; the only behaviour you can specify is the deleter. There's intrusive_ptr if you want to manage your own reference counting.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top