
16 May
2008
16 May
'08
5:50 p.m.
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?