You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would recommend to add an empty nonvirtual and protected destructor to the ModelBuilder base class to prevent the deletion through a base class pointer.
ModelBuilder *m = PCAModelBuilder::Create();
delete m;
would only call the destructor of ModelBuilder but not the one of PCAModelBuilder. I think, it even leads to undefined behaviour.
Cheers
The text was updated successfully, but these errors were encountered:
I would recommend to add an empty nonvirtual and protected destructor to the ModelBuilder base class to prevent the deletion through a base class pointer.
ModelBuilder *m = PCAModelBuilder::Create();
delete m;
would only call the destructor of ModelBuilder but not the one of PCAModelBuilder. I think, it even leads to undefined behaviour.
Cheers
The text was updated successfully, but these errors were encountered: