Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-11-21 08:27:42


When the macro BOOST_ENABLE_SP_DEBUG_HOOKS is defined, the Boost smart
pointers will call the following debug hook routines:

namespace boost
{
    void sp_scalar_constructor_hook(void * p);
    void sp_array_constructor_hook(void * p);
    void sp_scalar_destructor_hook(void * p);
    void sp_array_destructor_hook(void * p);
}

immediately before claiming/releasing ownership of a pointer.

A sample implementation of these debug hooks is available in
libs\smart_ptr\sp_debug_hooks.cpp. Just #define the macro and link with
sp_debug_hooks.cpp.

--
Peter Dimov
http://www.pdimov.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk