|
Boost Users : |
From: Kevin Martin (kev82_at_[hidden])
Date: 2008-05-16 13:41:42
On 16 May 2008, at 16:49, Noah Roberts wrote:
> You can do a lot more than that! Consider the case of a handle of
> some
> sort that you need to return to a service when you are done. Case in
> point, in order to get rid of an sqlite database connection pointer
> you
> call db_close(), NOT delete.
>
> No big deal, just use db_close as your deleter!
Is encapsulating the sqlite pointer in an object and having the
destructor do that not a better alternative?
Other than the time and effort required to develop an encapsulating
class I can't think of an example where it is better to do this.
Except for stack/static objects. I'm pretty new to C++ though.
Thanks,
Kevin Martin
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