Boost logo

Boost Users :

From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2008-05-16 13:50:38


Kevin Martin wrote:
> 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?

Why would it be? What's gained?


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