Boost logo

Boost :

From: Lie-Quan Lee (llee1_at_[hidden])
Date: 2001-04-05 16:46:03

I am running into a situation that I want a reference-counting pointer
but when the counter goes to zero, I want do something based on that
pointer before the contained pointer get deleted. One implementation
could be shared_ptr takes the second template argument (function
object). Then, the function object gets invoked before the contained
pointer is deleted.

I am wondering if the situation I run into is common to other people
or not. If it is quite common, it would be better that boost could
modify shared_ptr. Otherwise, it might not worthy.

Or there is other better solution to my situation?


Lie-Quan Lee

Boost list run by bdawes at, gregod at, cpdaniel at, john at