Question

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!

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top