add destructor for Prototype Pattern
parent
f9f8fc7dab
commit
990e1a53fd
|
@ -46,6 +46,10 @@ public:
|
|||
work->workModel = this->workModel;
|
||||
return work;
|
||||
}
|
||||
~ConcreteWork(){
|
||||
delete workModel;
|
||||
workModel = nullptr;
|
||||
}
|
||||
|
||||
void setName(char* iName){
|
||||
this->name = iName;
|
||||
|
|
Loading…
Reference in New Issue