|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-07-25 14:55:20
shared_ptr_updates.zip in the smart_ptr folder contains an updated
shared_ptr that accepts a 'finalizer' function as a second argument.
Unfortunately
shared_ptr<FILE> file_ptr(fopen(file_name,file_mode),fclose);
is not a very good example of its functionality because fclose() will crash
when called with a NULL argument. :-)
This version is a bit more taxing so I don't know what the regression test
will say about it. The tests work on my compilers.
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk