|
Boost : |
From: Michiel Salters (Michiel.Salters_at_[hidden])
Date: 2001-12-17 04:51:08
I don't get it.
The smart_ptr<T> classes don't release just memory; they destroy the T
object pointed to. That means any resource cleaned up by T::~T is
released, too. So if T is a WindowHandle class the window will be
removed. What more do you want?
> -----Original Message-----
> From: Assaf Lavie [mailto:assaflav_at_[hidden]]
> Sent: Tuesday, December 11, 2001 9:13 AM
> To: boost_at_[hidden]
> Subject: [boost] Suggestion: Custom deallocator for smart_ptr classes
>
>
> It would be nice if those template classes would accept a
> deallocator class
> as second argument.
> This way one could use the smart_ptr classes for handling
> other types of
> resources - not just memory allocated using new.
> Was this considered?
>
> Assaf Lavie
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk