Boost logo

Boost :

From: Phil Nash (phil.nash.lists_at_[hidden])
Date: 2003-02-20 13:12:59

[Anthony Williams]
> On Windows, for example, you can use GlobalAlloc to allocate some memory,
> you get an HGLOBAL back --- a handle to the memory. You need to call
> GlobalLock with that handle to get a pointer to the memory which you can
> actually use. The resource manager therefore needs to keep track of the
> handle, rather than the pointer (which may be different after different
> to GlobalLock, if there has been an intervening GlobalUnlock). Indeed, the
> pointer to the locked memory is essentially a separate resource, acquired
> GlobalLock() and released with GlobalUnlock. It would be sensible to be
> to use the same framework for both the handle and the pointer.

This sounds like a perfect case where using a smart_PTR would be very
confusing, maybe dangerously so!

Err.. but just to be sure, are you saying this in support of smart_resource?



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