C
Christopher
Quite awhile back it was advised to me to use a boost::unique_ptr to
return an allocated object that I am obtaining from a COM library and
passing back to the caller, where the caller will be the owner. All I
need from standard C++ is the ability to store the pointer and provide
my custom deletion, because I must call Release() on the object.
I finally got around to trying it (as opposed to a shared_ptr) and my
compiler is complaining that I have an invalid template argument for
'D'
How do I tell it," I just want you to call the object's Release()
method? "
Here is my typedef
typdef boost::interprocess:unique_ptr<ID3D10Device, boost::mem_fn
(&ID3D10Device::Release)> ID3D10Device_UniquePtr;
with ID3D10Device being the interface I am obtaining from the COM
library upon which I must call Release()
return an allocated object that I am obtaining from a COM library and
passing back to the caller, where the caller will be the owner. All I
need from standard C++ is the ability to store the pointer and provide
my custom deletion, because I must call Release() on the object.
I finally got around to trying it (as opposed to a shared_ptr) and my
compiler is complaining that I have an invalid template argument for
'D'
How do I tell it," I just want you to call the object's Release()
method? "
Here is my typedef
typdef boost::interprocess:unique_ptr<ID3D10Device, boost::mem_fn
(&ID3D10Device::Release)> ID3D10Device_UniquePtr;
with ID3D10Device being the interface I am obtaining from the COM
library upon which I must call Release()