I have a purely abstract class:
class Abstract{
void func1(arg1, arg2) = 0;
}
And its implementation with a destructor:
class Concrete : public Abstract{
void func1(arg1,arg2) { /*implementation code..*/ };
~Concrete() {/*code for the destructor..*/}
In main.cpp I create an unique pointer for it:
int main(){
std::unique_ptr<Abstract> class = std::make_unique<Concrete>();
//do operations with it
class.reset();
}
After I'm done with class
I need it to call the (custom) destructor of its current implementation class
, but .reset()
doesn't do that. How do I call the destructor of this implementation of Abstract
class?