質問

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