Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2002-01-26 18:05:28

From: <scleary_at_[hidden]>
> If you (or the user) don't want to create a separate policy plugin for each
> type of releasable resource, we might want to consider providing (as part of
> Boost, I mean) a shared/scoped_ptr<> that calls a function<void> on
> destruction. This would also be helpful in other situations.
> I already use a simple object of this type in my code -- it just derives
> from noncopyable and runs the function in its destructor. As such, it acts
> as a scoped_ptr<function<void> > that "frees" its "resource" by executing
> it.

It seems that Peter's design already allows this, no?

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