|
Boost Users : |
Subject: Re: [Boost-users] [Smart Ptr] explicit checked_delete specialization ?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-01-26 12:48:58
On Mon, Jan 26, 2009 at 1:47 AM, Alexander <gutenev_at_[hidden]> wrote:
> Is this OK to specialize boost::checked_delete to control deletion with
> scoped_ptr ? Or to specialize some boost::scoped_ptr members for the same
> purpose ?
I don't see checked_delete mentioned in the scoped_ptr documentation,
so the answer to your first question seems to be "no". As for
specializations, scoped_ptr is so simple that you'd be better off
writing your own class template to release the object differently,
IMO.
You don't say much about your use case but shared_ptr with custom
deleter and/or allocator may be exactly what you need.
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net