How to use std :: unique_ptr for handles and pointers using custom delters (I don’t know how to translate deleter) is understandable. But how should this be followed if, instead of a deleter, you need to call a class method (for example, & SomeClass :: Release)?
Sort of:
std::unique_ptr<void, decltype(&IADs::Release)> lock(pRoot, &IADs::Release); This is not, of course, and works to free the resource as a parameter for the deleter.
Is it possible to transfer an object instance when instantiating a 2x template? (this and a pointer to the method).
I understand that this is a container, and it seems like it should not solve such tasks, but the question remains. It begs a class wrapper. But maybe there is a solution with std :: unique_ptr?