Hello list,

In my application i am using a shared_ptr to manage the lifetime of some important objects. Lately i've been noticing that they are not being destroyed (their destructor is never called) and their use count is 9.
I've started debugging and noticed that if i pass the shared_ptr to boost::bind as a parameter when the binded function is executed the use_count is greater than what would be expected (in my particular case 4 instead of one). As i make use of boost::bind, the shared_ptr reaches a point where its use_count is way out of expectations, getting to 9.
So is this expected? Am i incorrectly using boost::bind or shared_ptr in this situation?

Sorry not giving more detailed info or code, for now this is the info i can give.

Thank you all for your time,
--
Matheus Araújo Aguiar
Computer Scientist
matheus.pit@gmail.com