Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2004-12-29 06:06:23

>> is it possible to use smart_ptr with handles ( e.g. HWND, HBRUSH, HDC,
>> etc )?
> Policy based smart pointer easily handle HANDLE ;))

I believe shared_ptr with a custom deleter can work with handles (which are
really just pointers in disguise), probably something like:

void handle_deleter(void* p)

shared_ptr<void> phandle(my_handle, &handle_deleter);



Boost list run by bdawes at, gregod at, cpdaniel at, john at